Skip map objects beyond the AVA2 object loading distance

AVA2 builds with ENABLE_MAP_OBJECT_OPTIMIZATION: CArea::
__UpdateLoadedObjectInstances unloads objects whose 2D distance from the
main actor is at least max(OBJECT_DIST, 5000). CPythonBackground::Update
now takes the main actor position (as CPythonApplication passes it) and
sets that loading center on MapObjectManager, which skips farther
objects before their frustum test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-12 17:14:00 +09:00
co-authored by Claude Opus 5.5
parent 46880be537
commit b57f2fba99
5 changed files with 17 additions and 4 deletions
+2 -1
View File
@@ -184,7 +184,8 @@ public:
void CreateSpecialEffect(uint32_t dwID, float fx, float fy, float fz, const char* szFileName);
void DeleteSpecialEffect(uint32_t dwID);
void Update(float fCameraX, float fCameraY, float fCameraZ);
// Original CPythonApplication passes the main actor position (map-object loading center).
void Update(float fCenterX, float fCenterY, float fCenterZ);
void Render();
void RenderSky();