Fix warnings, fix post-rebase issues

This commit is contained in:
rackover 2021-04-05 18:13:00 +02:00
parent fe2e2f1b3c
commit aa9f98b0e7
3 changed files with 8 additions and 49 deletions

View File

@ -891,9 +891,7 @@ namespace Assets
Game::TriggerHull* hulls = builder->getAllocator()->allocateArray<Game::TriggerHull>(clipMap->mapEnts->trigger.hullCount);
Game::TriggerModel* models = builder->getAllocator()->allocateArray<Game::TriggerModel>(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<Game::TriggerModel>();
hulls[i] = reader.read<Game::TriggerHull>();
@ -902,7 +900,7 @@ namespace Assets
size_t slabCount = reader.read<size_t>();
clipMap->mapEnts->trigger.slabCount = slabCount;
Game::TriggerSlab* slabs = builder->getAllocator()->allocateArray<Game::TriggerSlab>(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<Game::TriggerSlab>();
}

View File

@ -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<bool(Game::gentity_s*)>(0x5050C0)(ent);
}
int16 Maps::CM_TriggerModelBounds(int modelPointer, Game::Bounds* bounds) {
Game::MapEnts* ents = *reinterpret_cast<Game::MapEnts**>(0x1AA651C);
//Game::MapEnts* ents = *reinterpret_cast<Game::MapEnts**>(0x1AA651C); // Use me for debugging
return Utils::Hook::Call<int16(int, Game::Bounds*)>(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
//

View File

@ -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];