diff --git a/gamedata/common.games/master.games.txt b/gamedata/common.games/master.games.txt index 47e1476e..3e82358c 100644 --- a/gamedata/common.games/master.games.txt +++ b/gamedata/common.games/master.games.txt @@ -743,6 +743,25 @@ "game" "czero" } + "gamerules.games/cstrike/offsets-cgamerules.txt" + { + "game" "cstrike" + "game" "czero" + } + + "gamerules.games/cstrike/offsets-chalflifemultiplay.txt" + { + "game" "cstrike" + "game" "czero" + } + + "gamerules.games/cstrike/offsets-chalflifetraining.txt" + { + "game" "cstrike" + "game" "czero" + } + + // // Day Of Defeat @@ -1533,6 +1552,16 @@ "game" "dod" } + "gamerules.games/dod/offsets-cdodteamplay.txt" + { + "game" "dod" + } + + "gamerules.games/dod/offsets-cspdodrules.txt" + { + "game" "dod" + } + // // Team Fortress Classic @@ -2158,6 +2187,20 @@ "game" "tfc" } + "gamerules.games/tfc/offsets-chalflifemultiplay.txt" + { + "game" "tfc" + } + + "gamerules.games/tfc/offsets-chalflifeteamplay.txt" + { + "game" "tfc" + } + + "gamerules.games/tfc/offsets-cteamfortress.txt" + { + "game" "tfc" + } // // Half-Life: Opposing Force @@ -3338,6 +3381,25 @@ "game" "gearbox" } + "gamerules.games/gearbox/offsets-chalflifemultiplay.txt" + { + "game" "gearbox" + } + + "gamerules.games/gearbox/offsets-chalflifectfplay.txt" + { + "game" "gearbox" + } + + "gamerules.games/gearbox/offsets-chalflifecoopplay.txt" + { + "game" "gearbox" + } + + "gamerules.games/gearbox/offsets-chalflifeteamplay.txt" + { + "game" "gearbox" + } // // Half-Life: Deathmatch @@ -4032,4 +4094,15 @@ { "game" "valve" } + + "gamerules.games/valve/offsets-chalflifemultiplay.txt" + { + "game" "valve" + } + + "gamerules.games/valve/offsets-chalflifeteamplay.txt" + { + "game" "valve" + } + } diff --git a/modules/cstrike/cstrike/CstrikeHacks.cpp b/modules/cstrike/cstrike/CstrikeHacks.cpp index 7f07e96a..562c6a34 100644 --- a/modules/cstrike/cstrike/CstrikeHacks.cpp +++ b/modules/cstrike/cstrike/CstrikeHacks.cpp @@ -735,6 +735,7 @@ void InitFuncsAddresses() void InitClassMembers() { + // CBasePlayer members. CommonConfig->GetOffsetByClass("CBasePlayer", "m_iTeam" , &TeamDesc ); CommonConfig->GetOffsetByClass("CBasePlayer", "m_iMenu" , &MenuDesc ); CommonConfig->GetOffsetByClass("CBasePlayer", "m_bHasNightVision", &NvgsDesc ); @@ -742,12 +743,16 @@ void InitClassMembers() CommonConfig->GetOffsetByClass("CBasePlayer", "m_signals" , &SignalsDesc); CommonConfig->GetOffsetByClass("CBasePlayer", "m_iAccount" , &MoneyDesc ); + // GameRules members. + CommonConfig->GetOffsetByClass("CHalfLifeMultiplay", "m_bMapHasBombTarget", &BombTargetDesc); + if (!TeamDesc.fieldOffset || !MenuDesc.fieldOffset || !NvgsDesc.fieldOffset || !DefuserDesc.fieldOffset || !SignalsDesc.fieldOffset || - !MoneyDesc.fieldOffset) + !MoneyDesc.fieldOffset || + !BombTargetDesc.fieldOffset) { MF_Log("Invalid or missing entity gamedata files - forwards CS_OnBuy[Attempt] have been disabled"); ToggleHook_BuyCommands(false);