Mob fixes.

This commit is contained in:
dingo
2026-02-09 12:17:26 -05:00
parent 9a03cf89dd
commit 8ddbd3a231
3 changed files with 50 additions and 20 deletions
+11 -1
View File
@@ -300,10 +300,20 @@ func _handle_dungeon_enter(data: Dictionary):
var pid = p.get("id", p.get("Id"))
portals[pid] = p
# Parse mob catalog if included in the dungeon-enter response
var catalog = data.get("mobCatalog", data.get("MobCatalog", []))
if catalog is Array and catalog.size() > 0:
for entry in catalog:
var cid = entry.get("id", entry.get("Id"))
if cid != null:
mob_catalog[cid] = entry
print("[GameState] Mob catalog from enter: %d entries" % catalog.size())
_prefetch_mob_textures_from_list(catalog)
# Prefetch mob textures early on web (mobs list is included in enter payload)
var mobs_list = data.get("mobs", data.get("Mobs", []))
_prefetch_mob_textures_from_list(mobs_list)
set_state(STATE_PLAYING)
dungeon_entered.emit()