diff --git a/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp b/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp index 0a2cbeb3..08e1e03f 100644 --- a/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp +++ b/src/Components/Modules/AssetInterfaces/IclipMap_t.cpp @@ -891,9 +891,7 @@ namespace Assets Game::TriggerHull* hulls = builder->getAllocator()->allocateArray(clipMap->mapEnts->trigger.hullCount); Game::TriggerModel* models = builder->getAllocator()->allocateArray(clipMap->mapEnts->trigger.count); - int slabCountSoFar = 0; - - for (int i = 0; i < clipMap->numSubModels; ++i) + for (unsigned int i = 0; i < clipMap->numSubModels; ++i) { models[i] = reader.read(); hulls[i] = reader.read(); @@ -902,7 +900,7 @@ namespace Assets size_t slabCount = reader.read(); clipMap->mapEnts->trigger.slabCount = slabCount; Game::TriggerSlab* slabs = builder->getAllocator()->allocateArray(clipMap->mapEnts->trigger.slabCount); - for (int i = 0; i < clipMap->mapEnts->trigger.slabCount; i++) { + for (unsigned int i = 0; i < clipMap->mapEnts->trigger.slabCount; i++) { slabs[i] = reader.read(); } diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 0d98db04..6b9b8ffb 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -742,19 +742,15 @@ namespace Components bool Maps::SV_SetTriggerModelHook(Game::gentity_s* ent) { - //Logger::Print("SETTRIGGERMODELHOOK %s\n", ent->target); - std::string classname = Game::SL_ConvertToString(ent->script_classname); - std::string targetname = Game::SL_ConvertToString(ent->targetname); - //std::string test = ""; - //if (ent->padding_short) { - // test = Game::SL_ConvertToString(ent->padding_short); - //} + // Use me for debugging + //std::string classname = Game::SL_ConvertToString(ent->script_classname); + //std::string targetname = Game::SL_ConvertToString(ent->targetname); return Utils::Hook::Call(0x5050C0)(ent); } int16 Maps::CM_TriggerModelBounds(int modelPointer, Game::Bounds* bounds) { - Game::MapEnts* ents = *reinterpret_cast(0x1AA651C); + //Game::MapEnts* ents = *reinterpret_cast(0x1AA651C); // Use me for debugging return Utils::Hook::Call(0x4416C0)(modelPointer, bounds); } @@ -797,11 +793,12 @@ namespace Components Utils::Hook(0x5EE577, Maps::G_SpawnTurretHook, HOOK_CALL).install()->quick(); Utils::Hook(0x44A4D5, Maps::G_SpawnTurretHook, HOOK_CALL).install()->quick(); +#ifdef DEBUG // Check trigger models Utils::Hook(0x5FC0F1, Maps::SV_SetTriggerModelHook, HOOK_CALL).install()->quick(); Utils::Hook(0x5FC2671, Maps::SV_SetTriggerModelHook, HOOK_CALL).install()->quick(); - Utils::Hook(0x5050D4, Maps::CM_TriggerModelBounds, HOOK_CALL).install()->quick(); +#endif // diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index effa3f6a..b7bfe710 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -4474,42 +4474,6 @@ namespace Game char pad3[724]; } gclient_t; - /* 1571 */ - struct DSkelPartBits - { - int anim[6]; - int control[6]; - int worldCtrl[6]; - int skel[6]; - }; - - /* 1572 */ - struct DSkel - { - DSkelPartBits partBits; - int timeStamp; - /*DObjAnimMat*/void *mat; - }; - - /* 1573 */ - struct DObj - { - /*XAnimTree_s*/ void* tree; - unsigned __int16 duplicateParts; - unsigned __int16 entnum; - char duplicatePartsSize; - char numModels; - char numBones; - char flags; - unsigned int ignoreCollision; - volatile int locked; - DSkel skel; - float radius; - unsigned int hidePartBits[6]; - XModel** models; - }; - - struct LerpEntityState { char pad[0x70];