Skip to content

Commit 11d9756

Browse files
committed
Use less-likely-to-be-detoured signature for m_aObjects getter
Closes #4.
1 parent dc5b660 commit 11d9756

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

gamedata/tf2.utils.nosoop.txt

+8-9
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
}
4040
"windows"
4141
{
42-
"signature" "CTFPlayer::RemoveAllObjects()"
43-
"offset" "34"
42+
"signature" "CTFPlayer::AddObject()"
43+
"offset" "54"
4444
}
4545
}
4646
"offsetof(CTFPlayer::m_flRespawnTimeOverride)"
@@ -161,6 +161,12 @@
161161
"linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBasef"
162162
"windows" "\x55\x8B\xEC\x83\xEC\x08\x56\x8B\xF1\x8B\x8E\x90\x01\x00\x00\x8B\x01"
163163
}
164+
"CTFPlayer::AddObject()"
165+
{
166+
// we only use this to get offsetof(CTFPlayer::m_aObjects) on Windows
167+
"library" "server"
168+
"windows" "\x55\x8B\xEC\x53\x56\x57\x8B\x7D\x08\x8B\xD9\x85\xFF\x74\x2A\x8B\x07\x8B\xCF\xFF\x50\x08\x8B\xCF"
169+
}
164170
"CTFPlayer::GetEntityForLoadoutSlot()"
165171
{
166172
// called a few blocks after function with unique x-ref string "enable_misc2_noisemaker"
@@ -197,13 +203,6 @@
197203
"linux" "@_ZN9CTFPlayer14IsReadyToSpawnEv"
198204
"windows" "\x56\x8B\xF1\x80\xBE\x2A\x2A\x00\x00\x00\x74\x04\x32\xC0\x5E\xC3\x8B\x2A\x2A\x2A\x00\x00"
199205
}
200-
"CTFPlayer::RemoveAllObjects()"
201-
{
202-
// contains reference to string "object_removed"
203-
// we only use this to get offsetof(CTFPlayer::m_aObjects) on Windows
204-
"library" "server"
205-
"windows" "\x55\x8B\xEC\x83\xEC\x08\x8B\xC1\x57"
206-
}
207206
"CTFPlayerShared::GetMaxBuffedHealth()"
208207
{
209208
// unique xref to call containing unique xref string "add_maxhealth"

0 commit comments

Comments
 (0)