Fixing some stuff related to attacks

This commit is contained in:
Vladislav Khorev committed 2026-07-12 16:55:23 +03:00
1 parent 9d03b52c2a
commit 92929118d5
7 files changed
+32 -7

No files matched your search

+4
View File
@@ -363,6 +363,8 @@ namespace ZL {
{
std::vector<std::unique_ptr<Character>> npcs;
int index = 0;
for (const auto& npcData : loadNpcsFromJson(jsonPath, zipPath)) {
SDL_PumpEvents();
std::cout << "Loading NPC: " << npcData.name << std::endl;
@@ -371,7 +373,9 @@ namespace ZL {
if (npc) {
std::cout << "Successfully loaded NPC: " << npcData.name << " at ("
<< npcData.positionX << ", " << npcData.positionY << ", " << npcData.positionZ << ")" << std::endl;
npc->index = index;
npcs.push_back(std::move(npc));
index = index + 1;
}
} catch (const std::exception& e) {
std::cerr << "GameObjectLoader: Failed to load NPC '" << npcData.name << "': " << e.what() << std::endl;