WIP: Temporary V35 Retail build #5

Closed
Dusk-92 wants to merge 132 commits from test/safe-core-v8-retail35 into main
Showing only changes of commit 1314860bde - Show all commits
+13 -9
View File
@@ -207,14 +207,14 @@ pub fn scanObjects() void {
game_obj_model_count = 0; game_obj_model_count = 0;
resetDiag(); resetDiag();
// IS_IN_WORLD is kept as a diagnostic only. On this modified client it // IS_IN_WORLD and OBJECT_MANAGER_PTR are diagnostics only on this client.
// reports 0 even while EndScene/DIP are clearly running in-world. // Both legacy globals can stay 0 even though WoW's object lookup functions
// are fully usable in-world.
if (wow.isInGame()) debug_in_world_seen = true; if (wow.isInGame()) debug_in_world_seen = true;
if (wow.hasObjectManager()) debug_object_manager_seen = true;
// Use the object manager as the actual readiness gate for this debug build. // Resolve the local player through the engine API instead of the legacy
if (!wow.hasObjectManager()) return; // OBJECT_MANAGER_PTR global. This is also how Nampower resolves objects.
debug_object_manager_seen = true;
const local_player = wow.getLocalPlayer(); const local_player = wow.getLocalPlayer();
if (local_player == 0) return; if (local_player == 0) return;
debug_local_player_seen = true; debug_local_player_seen = true;
@@ -240,9 +240,13 @@ pub fn scanObjects() void {
} }
} }
// Iterate all visible objects // Iterate all visible objects only when the legacy object-manager global
var obj = wow.objectFirst(); // is available. Target outlining above does not depend on this traversal.
if (obj != 0) debug_object_scan_seen = true; var obj: u32 = 0;
if (wow.hasObjectManager()) {
obj = wow.objectFirst();
if (obj != 0) debug_object_scan_seen = true;
}
while (obj != 0) : (obj = wow.objectNext(obj)) { while (obj != 0) : (obj = wow.objectNext(obj)) {
const obj_type = wow.getObjectType(obj); const obj_type = wow.getObjectType(obj);
const guid = wow.getObjectGUID(obj); const guid = wow.getObjectGUID(obj);