Jump to content
Maintenance ×
×
×
  • Create New...

CArea loading optimization


Recommended Posts

  • Honorable Member
Posted (edited)

Hello everyone,

I was optimizing the loading of maps for my server and I decided to share it with the public. With this modifications, only the objects and effects around the character will be loaded and it will handle their load and unload as you move around. Also effect updatings are optimized a way that closer effects are updated more frequently.

.gif

Okay, so let's start the work 😄

This is the hidden content, please

 

Good luck! 🙂

Edited by Distraught
  • Metin2 Dev 93
  • Love 23
  • Love 3
  • Good 11
  • Scream 4
  • Think 2

WRnRW3H.gif

Link to comment
Share on other sites

  • Honorable Member
Posted (edited)

Thank you guys ❤️

  

31 minutes ago, Ulthar said:

Thanks! ^^
Do we need to create the python part for ourselves? 😮

@ ASIKOO #honorablefordistraught

Yes, that's not included, it will use the clipping distance by default. You can play with the distance in CArea::GetMaxLoadingDistanceSqr.

Edited by Distraught

WRnRW3H.gif

Link to comment
Share on other sites

  • Premium
1 hour ago, Distraught said:

Yes, that's not included, it will use the clipping distance by default. You can play with the distance in CArea::GetMaxLoadingDistanceSqr.

Thanks for answer! ^^

  • Love 1
Link to comment
Share on other sites

in CArea::__UpdateLoadedObjectInstances u have new func "emplace" and here it is not used value_type

				if ((*it)->dwType == prt::PROPERTY_TYPE_BUILDING)
					m_GraphicThingInstanceCRCMap.emplace(TGraphicThingInstanceCRCMap::value_type((*it)->pThingInstance, c_pObjectData->dwCRC));

 

like this:

				if ((*it)->dwType == prt::PROPERTY_TYPE_BUILDING)
					m_GraphicThingInstanceCRCMap.emplace((*it)->pThingInstance, c_pObjectData->dwCRC);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.