@@ -124,26 +124,39 @@ public void OnPluginStart() {
124
124
StartPrepSDKCall (SDKCall_Player );
125
125
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Signature , " CTFPlayer::TeamFortress_SetSpeed()" );
126
126
g_SDKCallUpdatePlayerSpeed = EndPrepSDKCall ();
127
+ if (! g_SDKCallUpdatePlayerSpeed ) {
128
+ SetFailState (" Failed to set up call to " ... " CTFPlayer::TeamFortress_SetSpeed()" );
129
+ }
127
130
128
131
StartPrepSDKCall (SDKCall_Player );
129
132
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
130
133
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CBaseEntity::TakeHealth()" );
131
134
PrepSDKCall_AddParameter (SDKType_Float , SDKPass_Plain );
132
135
PrepSDKCall_AddParameter (SDKType_PlainOldData , SDKPass_Plain );
133
136
g_SDKCallPlayerTakeHealth = EndPrepSDKCall ();
137
+ if (! g_SDKCallPlayerTakeHealth ) {
138
+ SetFailState (" Failed to set up call to " ... " CBaseEntity::TakeHealth()" );
139
+ }
134
140
135
141
StartPrepSDKCall (SDKCall_Player );
136
142
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Signature , " CTFPlayer::GetMaxAmmo()" );
137
143
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
138
144
PrepSDKCall_AddParameter (SDKType_PlainOldData , SDKPass_Plain );
139
145
PrepSDKCall_AddParameter (SDKType_PlainOldData , SDKPass_Plain );
140
146
g_SDKCallPlayerGetMaxAmmo = EndPrepSDKCall ();
147
+ if (! g_SDKCallPlayerGetMaxAmmo ) {
148
+ SetFailState (" Failed to set up call to " ... " CTFPlayer::GetMaxAmmo()" );
149
+ }
141
150
142
151
StartPrepSDKCall (SDKCall_Player );
143
152
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual ,
144
153
" CBaseCombatCharacter::Weapon_ShootPosition()" );
145
154
PrepSDKCall_SetReturnInfo (SDKType_Vector , SDKPass_ByValue );
146
155
g_SDKCallPlayerGetShootPosition = EndPrepSDKCall ();
156
+ if (! g_SDKCallPlayerGetShootPosition ) {
157
+ SetFailState (" Failed to set up call to "
158
+ ... " CBaseCombatCharacter::Weapon_ShootPosition()" );
159
+ }
147
160
148
161
StartPrepSDKCall (SDKCall_Raw );
149
162
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
@@ -152,49 +165,76 @@ public void OnPluginStart() {
152
165
PrepSDKCall_AddParameter (SDKType_Bool , SDKPass_Plain );
153
166
PrepSDKCall_AddParameter (SDKType_Bool , SDKPass_Plain );
154
167
g_SDKCallPlayerSharedGetMaxHealth = EndPrepSDKCall ();
168
+ if (! g_SDKCallPlayerSharedGetMaxHealth ) {
169
+ SetFailState (" Failed to set up call to " ... " CTFPlayerShared::GetMaxBuffedHealth()" );
170
+ }
155
171
156
172
StartPrepSDKCall (SDKCall_Raw );
157
173
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Signature , " CTFPlayerShared::Burn()" );
158
174
PrepSDKCall_AddParameter (SDKType_CBasePlayer , SDKPass_Pointer , VDECODE_FLAG_ALLOWNULL );
159
175
PrepSDKCall_AddParameter (SDKType_CBaseEntity , SDKPass_Pointer , VDECODE_FLAG_ALLOWNULL );
160
176
PrepSDKCall_AddParameter (SDKType_Float , SDKPass_Plain );
161
177
g_SDKCallPlayerSharedBurn = EndPrepSDKCall ();
178
+ if (! g_SDKCallPlayerSharedBurn ) {
179
+ SetFailState (" Failed to set up call to " ... " CTFPlayerShared::Burn()" );
180
+ }
162
181
163
182
StartPrepSDKCall (SDKCall_Raw );
164
183
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Signature ,
165
184
" CTFPlayerShared::IsImmuneToPushback()" );
166
185
PrepSDKCall_SetReturnInfo (SDKType_Bool , SDKPass_Plain );
167
186
g_SDKCallPlayerSharedImmuneToPushback = EndPrepSDKCall ();
187
+ if (! g_SDKCallPlayerSharedImmuneToPushback ) {
188
+ SetFailState (" Failed to set up call to " ... " CTFPlayerShared::IsImmuneToPushback()" );
189
+ }
168
190
169
191
StartPrepSDKCall (SDKCall_Entity );
170
192
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
171
193
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CBaseEntity::GetMaxHealth()" );
172
194
g_SDKCallEntityGetMaxHealth = EndPrepSDKCall ();
195
+ if (! g_SDKCallEntityGetMaxHealth ) {
196
+ SetFailState (" Failed to set up call to " ... " CBaseEntity::GetMaxHealth()" );
197
+ }
173
198
174
199
StartPrepSDKCall (SDKCall_Entity );
175
200
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CBaseEntity::IsBaseCombatWeapon()" );
176
201
PrepSDKCall_SetReturnInfo (SDKType_Bool , SDKPass_Plain );
177
202
g_SDKCallIsEntityWeapon = EndPrepSDKCall ();
203
+ if (! g_SDKCallIsEntityWeapon ) {
204
+ SetFailState (" Failed to set up call to " ... " CBaseEntity::IsBaseCombatWeapon()" );
205
+ }
178
206
179
207
StartPrepSDKCall (SDKCall_Entity );
180
208
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CBaseEntity::IsWearable()" );
181
209
PrepSDKCall_SetReturnInfo (SDKType_Bool , SDKPass_Plain );
182
210
g_SDKCallIsEntityWearable = EndPrepSDKCall ();
211
+ if (! g_SDKCallIsEntityWearable ) {
212
+ SetFailState (" Failed to set up call to " ... " CBaseEntity::IsWearable()" );
213
+ }
183
214
184
215
StartPrepSDKCall (SDKCall_Entity );
185
216
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CBaseCombatWeapon::GetSlot()" );
186
217
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
187
218
g_SDKCallWeaponGetSlot = EndPrepSDKCall ();
219
+ if (! g_SDKCallWeaponGetSlot ) {
220
+ SetFailState (" Failed to set up call to " ... " CBaseCombatWeapon::GetSlot()" );
221
+ }
188
222
189
223
StartPrepSDKCall (SDKCall_Entity );
190
224
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CTFWeaponBase::GetWeaponID()" );
191
225
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
192
226
g_SDKCallWeaponGetID = EndPrepSDKCall ();
227
+ if (! g_SDKCallWeaponGetID ) {
228
+ SetFailState (" Failed to set up call to " ... " CTFWeaponBase::GetWeaponID()" );
229
+ }
193
230
194
231
StartPrepSDKCall (SDKCall_Entity );
195
232
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CTFWeaponBase::GetMaxClip1()" );
196
233
PrepSDKCall_SetReturnInfo (SDKType_PlainOldData , SDKPass_Plain );
197
234
g_SDKCallWeaponGetMaxClip = EndPrepSDKCall ();
235
+ if (! g_SDKCallWeaponGetMaxClip ) {
236
+ SetFailState (" Failed to set up call to " ... " CTFWeaponBase::GetMaxClip1()" );
237
+ }
198
238
199
239
StartPrepSDKCall (SDKCall_Player );
200
240
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Signature ,
@@ -203,11 +243,17 @@ public void OnPluginStart() {
203
243
PrepSDKCall_AddParameter (SDKType_Bool , SDKPass_Plain );
204
244
PrepSDKCall_SetReturnInfo (SDKType_CBaseEntity , SDKPass_Pointer );
205
245
g_SDKCallPlayerGetEntityForLoadoutSlot = EndPrepSDKCall ();
246
+ if (! g_SDKCallPlayerGetEntityForLoadoutSlot ) {
247
+ SetFailState (" Failed to set up call to " ... " CTFPlayer::GetEntityForLoadoutSlot()" );
248
+ }
206
249
207
250
StartPrepSDKCall (SDKCall_Player );
208
251
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Virtual , " CTFPlayer::EquipWearable()" );
209
252
PrepSDKCall_AddParameter (SDKType_CBaseEntity , SDKPass_Pointer );
210
253
g_SDKCallPlayerEquipWearable = EndPrepSDKCall ();
254
+ if (! g_SDKCallPlayerEquipWearable ) {
255
+ SetFailState (" Failed to set up call to " ... " CTFPlayer::EquipWearable()" );
256
+ }
211
257
212
258
StartPrepSDKCall (SDKCall_Static );
213
259
PrepSDKCall_SetFromConf (hGameConf , SDKConf_Signature , " PointInRespawnRoom()" );
@@ -216,6 +262,11 @@ public void OnPluginStart() {
216
262
PrepSDKCall_AddParameter (SDKType_Vector , SDKPass_ByRef );
217
263
PrepSDKCall_AddParameter (SDKType_Bool , SDKPass_Plain );
218
264
g_SDKCallPointInRespawnRoom = EndPrepSDKCall ();
265
+ if (! g_SDKCallPointInRespawnRoom ) {
266
+ SetFailState (" Failed to set up call to " ... " PointInRespawnRoom()" );
267
+ }
268
+
269
+ // GameConfGetAddressOffset throws fail state if invalid; no need to validate here
219
270
220
271
// networked CUtlVector offset support landed in 1.11; try to locate an offset there first
221
272
offs_CTFPlayer_hMyWearables =
0 commit comments