Add gamedata for Contagion (bug 6007, r=asherkin).
Add gamedata for Contagion (
bug 6007, r=asherkin).
1.1 --- a/gamedata/core.games/common.games.txt Sat Mar 29 14:14:00 2014 -0400
1.2 +++ b/gamedata/core.games/common.games.txt Sat Mar 29 14:14:00 2014 -0400
1.3 @@ -99,6 +99,7 @@
1.4 "engine" "csgo"
1.5 "engine" "dota"
1.6 "engine" "sdk2013"
1.7 + "engine" "contagion"
1.8 }
1.9
1.10 "Offsets"
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/gamedata/core.games/engine.contagion.txt Sat Mar 29 14:14:00 2014 -0400
2.3 @@ -0,0 +1,48 @@
2.4 +/**
2.5 + * Do not edit this file. Any changes will be overwritten by the gamedata
2.6 + * updater or by upgrading your SourceMod install.
2.7 + *
2.8 + * To override data in this file, create a subdirectory named "custom" and
2.9 + * place your own gamedata file(s) inside of it. Such files will be parsed
2.10 + * after SM's own.
2.11 + *
2.12 + * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
2.13 + */
2.14 +
2.15 +"Games"
2.16 +{
2.17 + /* CGlobalEntityList */
2.18 + "#default"
2.19 + {
2.20 + "Offsets"
2.21 + {
2.22 + /* Offset into LevelShutdown */
2.23 + "gEntList"
2.24 + {
2.25 + "windows" "11"
2.26 + }
2.27 +
2.28 + "EntInfo"
2.29 + {
2.30 + "windows" "4"
2.31 + "linux" "4"
2.32 + "mac" "4"
2.33 + }
2.34 + }
2.35 +
2.36 + "Signatures"
2.37 + {
2.38 + "LevelShutdown"
2.39 + {
2.40 + "library" "server"
2.41 + "windows" "\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
2.42 + }
2.43 + "gEntList"
2.44 + {
2.45 + "library" "server"
2.46 + "linux" "@gEntList"
2.47 + "mac" "@gEntList"
2.48 + }
2.49 + }
2.50 + }
2.51 +}
3.1 --- a/gamedata/core.games/master.games.txt Sat Mar 29 14:14:00 2014 -0400
3.2 +++ b/gamedata/core.games/master.games.txt Sat Mar 29 14:14:00 2014 -0400
3.3 @@ -25,6 +25,11 @@
3.4 "engine" "left4dead2"
3.5 }
3.6
3.7 + "engine.contagion.txt"
3.8 + {
3.9 + "engine" "contagion"
3.10 + }
3.11 +
3.12 "engine.swarm.txt"
3.13 {
3.14 "engine" "alienswarm"
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/gamedata/sdkhooks.games/engine.contagion.txt Sat Mar 29 14:14:00 2014 -0400
4.3 @@ -0,0 +1,105 @@
4.4 +/**
4.5 + * Do not edit this file. Any changes will be overwritten by the gamedata
4.6 + * updater.
4.7 + *
4.8 + * To override data in this file, create a subdirectory named "custom" and
4.9 + * place your own gamedata file(s) inside of it. Such files will be parsed
4.10 + * after SM's own.
4.11 + *
4.12 + * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
4.13 + */
4.14 +
4.15 +
4.16 +"Games"
4.17 +{
4.18 + "#default"
4.19 + {
4.20 + "Offsets"
4.21 + {
4.22 + "EndTouch"
4.23 + {
4.24 + "windows" "108"
4.25 + }
4.26 + "FireBullets"
4.27 + {
4.28 + "windows" "121"
4.29 + }
4.30 + "GetMaxHealth"
4.31 + {
4.32 + "windows" "125"
4.33 + }
4.34 + "OnTakeDamage"
4.35 + {
4.36 + "windows" "71"
4.37 + }
4.38 + "PreThink"
4.39 + {
4.40 + "windows" "354"
4.41 + }
4.42 + "PostThink"
4.43 + {
4.44 + "windows" "355"
4.45 + }
4.46 + "Reload"
4.47 + {
4.48 + "windows" "281"
4.49 + }
4.50 + "SetTransmit"
4.51 + {
4.52 + "windows" "21"
4.53 + }
4.54 + "ShouldCollide"
4.55 + {
4.56 + "windows" "17"
4.57 + }
4.58 + "Spawn"
4.59 + {
4.60 + "windows" "23"
4.61 + }
4.62 + "StartTouch"
4.63 + {
4.64 + "windows" "106"
4.65 + }
4.66 + "Think"
4.67 + {
4.68 + "windows" "55"
4.69 + }
4.70 + "Touch"
4.71 + {
4.72 + "windows" "107"
4.73 + }
4.74 + "TraceAttack"
4.75 + {
4.76 + "windows" "69"
4.77 + }
4.78 + "Use"
4.79 + {
4.80 + "windows" "105"
4.81 + }
4.82 + "VPhysicsUpdate"
4.83 + {
4.84 + "windows" "165"
4.85 + }
4.86 + "Weapon_CanSwitchTo"
4.87 + {
4.88 + "windows" "286"
4.89 + }
4.90 + "Weapon_CanUse"
4.91 + {
4.92 + "windows" "280"
4.93 + }
4.94 + "Weapon_Drop"
4.95 + {
4.96 + "windows" "283"
4.97 + }
4.98 + "Weapon_Equip"
4.99 + {
4.100 + "windows" "281"
4.101 + }
4.102 + "Weapon_Switch"
4.103 + {
4.104 + "windows" "284"
4.105 + }
4.106 + }
4.107 + }
4.108 +}
4.109 \ No newline at end of file
5.1 --- a/gamedata/sdkhooks.games/master.games.txt Sat Mar 29 14:14:00 2014 -0400
5.2 +++ b/gamedata/sdkhooks.games/master.games.txt Sat Mar 29 14:14:00 2014 -0400
5.3 @@ -21,6 +21,11 @@
5.4 "engine" "left4dead"
5.5 }
5.6
5.7 + "engine.contagion.txt"
5.8 + {
5.9 + "engine" "contagion"
5.10 + }
5.11 +
5.12 "game.l4d2.txt"
5.13 {
5.14 "game" "left4dead2"
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/gamedata/sdktools.games/engine.contagion.txt Sat Mar 29 14:14:00 2014 -0400
6.3 @@ -0,0 +1,296 @@
6.4 +/**
6.5 + * Do not edit this file. Any changes will be overwritten by the gamedata
6.6 + * updater or by upgrading your SourceMod install.
6.7 + *
6.8 + * To override data in this file, create a subdirectory named "custom" and
6.9 + * place your own gamedata file(s) inside of it. Such files will be parsed
6.10 + * after SM's own.
6.11 + *
6.12 + * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
6.13 + */
6.14 +
6.15 +"Games"
6.16 +{
6.17 + /* Sounds */
6.18 + "#default"
6.19 + {
6.20 + "Keys"
6.21 + {
6.22 + "SlapSoundCount" "2"
6.23 + "SlapSound1" "player/damage1.wav"
6.24 + "SlapSound2" "player/damage2.wav"
6.25 + }
6.26 + }
6.27 +
6.28 + /* General Temp Entities */
6.29 + "#default"
6.30 + {
6.31 + "Offsets"
6.32 + {
6.33 + /* Offset into CBaseTempEntity constructor */
6.34 + "s_pTempEntities"
6.35 + {
6.36 + "windows" "19"
6.37 + }
6.38 + "GetTEName"
6.39 + {
6.40 + "windows" "4"
6.41 + "linux" "4"
6.42 + "mac" "4"
6.43 + }
6.44 + "GetTENext"
6.45 + {
6.46 + "windows" "8"
6.47 + "linux" "8"
6.48 + "mac" "8"
6.49 + }
6.50 + "TE_GetServerClass"
6.51 + {
6.52 + "windows" "0"
6.53 + "linux" "0"
6.54 + "mac" "0"
6.55 + }
6.56 + }
6.57 +
6.58 + "Signatures"
6.59 + {
6.60 + "CBaseTempEntity"
6.61 + {
6.62 + "library" "server"
6.63 + "windows" "\x55\x8B\xEC\x8B\xC1\x8B\x4D\x08\xC7\x00\x2A\x2A\x2A\x2A\x89"
6.64 + }
6.65 + "s_pTempEntities"
6.66 + {
6.67 + "library" "server"
6.68 + "linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
6.69 + "mac" "@_ZN15CBaseTempEntity15s_pTempEntitiesE"
6.70 + }
6.71 + }
6.72 + }
6.73 +
6.74 + /* CGlobalEntityList */
6.75 + "#default"
6.76 + {
6.77 + "Signatures"
6.78 + {
6.79 + /* Functions in CGlobalEntityList */
6.80 + "FindEntityByClassname"
6.81 + {
6.82 + "library" "server"
6.83 + "windows" "\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x4D\x08\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x1F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x31\x8B"
6.84 + "linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
6.85 + "mac" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
6.86 + }
6.87 + }
6.88 + }
6.89 +
6.90 + /* CBaseEntityOutput::FireOutput */
6.91 + "#default"
6.92 + {
6.93 + "Signatures"
6.94 + {
6.95 + "FireOutput"
6.96 + {
6.97 + "library" "server"
6.98 + "windows" "\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\x53\x56\x8B\x71\x2A\x85\xF6\x57\x89"
6.99 + "linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
6.100 + "mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
6.101 + }
6.102 + }
6.103 + }
6.104 +
6.105 + /* General GameRules */
6.106 + "#default"
6.107 + {
6.108 + "Offsets"
6.109 + {
6.110 + /* Offset into CreateGameRulesObject */
6.111 + "g_pGameRules"
6.112 + {
6.113 + "windows" "2"
6.114 + }
6.115 + }
6.116 +
6.117 + "Signatures"
6.118 + {
6.119 + /* This signature sometimes has multiple matches, but this
6.120 + * does not matter as g_pGameRules is involved in all of them.
6.121 + * The same g_pGameRules offset applies to each match.
6.122 + *
6.123 + * Sometimes this block of bytes is at the beginning of the static
6.124 + * CreateGameRulesObject function and sometimes it is in the middle
6.125 + * of an entirely different function. This depends on the game.
6.126 + */
6.127 + "CreateGameRulesObject"
6.128 + {
6.129 + "library" "server"
6.130 + "windows" "\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
6.131 + }
6.132 + "g_pGameRules"
6.133 + {
6.134 + "library" "server"
6.135 + "linux" "@g_pGameRules"
6.136 + "mac" "@g_pGameRules"
6.137 + }
6.138 + }
6.139 + }
6.140 +
6.141 + /* IServer interface pointer */
6.142 + "#default"
6.143 + {
6.144 + "Keys"
6.145 + {
6.146 + /* Signature for the beginning of IVEngineServer::CreateFakeClient.
6.147 + *
6.148 + * The engine binary is not actually scanned in order to look for
6.149 + * this. SourceHook is used to used to determine the address of the
6.150 + * function and this signature is used to verify that it contains
6.151 + * the expected code. A pointer to sv (IServer interface) is used
6.152 + * here.
6.153 + */
6.154 + "CreateFakeClient_Windows" "\x8B\x44\x24\x04\x50\xB9\x2A\x2A\x2A\x2A\xE8"
6.155 + }
6.156 +
6.157 + "Offsets"
6.158 + {
6.159 + /* Offset into IVEngineServer::CreateFakeClient */
6.160 + "sv"
6.161 + {
6.162 + "windows" "6"
6.163 + }
6.164 + }
6.165 +
6.166 + "Signatures"
6.167 + {
6.168 + /* CBaseServer object for IServer interface */
6.169 + "sv"
6.170 + {
6.171 + "library" "engine"
6.172 + "linux" "@sv"
6.173 + "mac" "@sv"
6.174 + }
6.175 + }
6.176 + }
6.177 +
6.178 + /* EntityFactoryDictionary function */
6.179 + "#default"
6.180 + {
6.181 + "Signatures"
6.182 + {
6.183 + "EntityFactory"
6.184 + {
6.185 + "library" "server"
6.186 + "windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
6.187 + "linux" "@_Z23EntityFactoryDictionaryv"
6.188 + "mac" "@_Z23EntityFactoryDictionaryv"
6.189 + }
6.190 + }
6.191 + }
6.192 +
6.193 + /* SetUserInfo data */
6.194 + "#default"
6.195 + {
6.196 + "Offsets"
6.197 + {
6.198 + /**
6.199 + * CBaseClient::SetUserCVar(char const*,char const*);
6.200 + * Linux offset straight from VTable dump.
6.201 + * Windows offset is crazy. Found the windows SetName function using string "(%d)%-.*s" (aD_S in IDA)
6.202 + * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
6.203 + */
6.204 + "SetUserCvar"
6.205 + {
6.206 + /* Not 100% sure on this, why would windows change and not linux - TEST ME */
6.207 + "windows" "17"
6.208 + "linux" "63"
6.209 + "mac" "63"
6.210 + }
6.211 + /**
6.212 + * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
6.213 + * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
6.214 + * Linux: mov byte ptr [esi+0B0h], 0
6.215 + * Win: mov byte ptr [esi+0B0h], 0
6.216 + *
6.217 + * L4D2: This has been moved into CBaseClient::UpdateUserSettings(), rest of the details are still relevant.
6.218 + */
6.219 + "InfoChanged"
6.220 + {
6.221 + "windows" "176"
6.222 + "linux" "176"
6.223 + "mac" "176"
6.224 + }
6.225 + }
6.226 + }
6.227 +
6.228 + "#default"
6.229 + {
6.230 + "Offsets"
6.231 + {
6.232 + "GiveNamedItem"
6.233 + {
6.234 + "windows" "507"
6.235 + }
6.236 + "RemovePlayerItem"
6.237 + {
6.238 + "windows" "290"
6.239 + }
6.240 + "Weapon_GetSlot"
6.241 + {
6.242 + "windows" "288"
6.243 + }
6.244 + "Ignite"
6.245 + {
6.246 + "windows" "222"
6.247 + }
6.248 + "Extinguish"
6.249 + {
6.250 + "windows" "225"
6.251 + }
6.252 + "Teleport"
6.253 + {
6.254 + "windows" "117"
6.255 + }
6.256 + "CommitSuicide"
6.257 + {
6.258 + "windows" "476"
6.259 + }
6.260 + "GetVelocity"
6.261 + {
6.262 + "windows" "149"
6.263 + }
6.264 + "EyeAngles"
6.265 + {
6.266 + "windows" "140"
6.267 + }
6.268 + "AcceptInput"
6.269 + {
6.270 + "windows" "43"
6.271 + }
6.272 + "SetEntityModel"
6.273 + {
6.274 + "windows" "26"
6.275 + }
6.276 + "WeaponEquip"
6.277 + {
6.278 + "windows" "281"
6.279 + }
6.280 + "Activate"
6.281 + {
6.282 + "windows" "35"
6.283 + }
6.284 + "PlayerRunCmd"
6.285 + {
6.286 + "windows" "455"
6.287 + }
6.288 + "GiveAmmo"
6.289 + {
6.290 + "windows" "274"
6.291 + }
6.292 + }
6.293 +
6.294 + "Keys"
6.295 + {
6.296 + "GameRulesProxy" "CTerrorGameRulesProxy"
6.297 + }
6.298 + }
6.299 +}
6.300 \ No newline at end of file
7.1 --- a/gamedata/sdktools.games/master.games.txt Sat Mar 29 14:14:00 2014 -0400
7.2 +++ b/gamedata/sdktools.games/master.games.txt Sat Mar 29 14:14:00 2014 -0400
7.3 @@ -25,6 +25,11 @@
7.4 "engine" "left4dead2"
7.5 }
7.6
7.7 + "engine.contagion.txt"
7.8 + {
7.9 + "engine" "contagion"
7.10 + }
7.11 +
7.12 "engine.swarm.txt"
7.13 {
7.14 "engine" "alienswarm"
8.1 --- a/tools/buildbot/PackageScript Sat Mar 29 14:14:00 2014 -0400
8.2 +++ b/tools/buildbot/PackageScript Sat Mar 29 14:14:00 2014 -0400
8.3 @@ -141,6 +141,7 @@
8.4 CopyFiles('gamedata/sdkhooks.games', 'addons/sourcemod/gamedata/sdkhooks.games',
8.5 [ 'common.games.txt',
8.6 'engine.blade.txt',
8.7 + 'engine.contagion.txt',
8.8 'engine.csgo.txt',
8.9 'engine.darkm.txt',
8.10 'engine.dota.txt',
8.11 @@ -178,6 +179,7 @@
8.12 [ 'common.games.txt',
8.13 'engine.bgt.txt',
8.14 'engine.blade.txt',
8.15 + 'engine.contagion.txt',
8.16 'engine.csgo.txt',
8.17 'engine.css.txt',
8.18 'engine.darkm.txt',
8.19 @@ -233,6 +235,7 @@
8.20 'common.games.txt',
8.21 'engine.bgt.txt',
8.22 'engine.blade.txt',
8.23 + 'engine.contagion.txt',
8.24 'engine.csgo.txt',
8.25 'engine.css.txt',
8.26 'engine.darkm.txt',