CTerrorPlayer::OnRideEnded
0x009a4440 · 1535 bytes · __thiscall
_ZN13CTerrorPlayer11OnRideEndedEPS_
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnRideEnded(CTerrorPlayer*) */
void __thiscall CTerrorPlayer::OnRideEnded(CTerrorPlayer *this,CTerrorPlayer *param_1)
{
uint uVar1;
CCSPlayer *this_00;
CBaseEdict *pCVar2;
code *pcVar3;
char *pcVar4;
undefined4 *puVar5;
int iVar6;
int *piVar7;
undefined4 uVar8;
CBaseAbility *this_01;
undefined *puVar9;
undefined *puVar10;
int iVar11;
longdouble lVar12;
undefined4 local_4c;
undefined4 local_48;
CAI_Concept local_44 [8];
AI_CriteriaSet local_3c [44];
CBaseEntity::StopSound((CBaseEntity *)this,"JockeyZombie.Ride");
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 != *(float *)(this + 0x30a0)) {
(**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x30a0);
*(float *)(this + 0x30a0) = (float)lVar12;
}
if (*(float *)(this + 0x309c) != 0.0) {
(**(code **)(*(int *)(this + 0x3098) + 4))(this + 0x3098,this + 0x309c);
*(undefined4 *)(this + 0x309c) = 0;
}
uVar1 = *(uint *)(this + 0x3edc);
if ((((uVar1 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar1 >> 0xc)) &&
(this_00 = *(CCSPlayer **)(puVar10 + 4), this_00 != (CCSPlayer *)0x0)) {
(**(code **)(*(int *)this + 0x7fc))(this,0x12,0);
(**(code **)(*(int *)(this_00 + 0x3ab4) + 200))(this_00 + 0x3ab4);
pcVar4 = (char *)SurvivorCharacterName(*(undefined4 *)(this_00 + 0x2ba0));
AI_CriteriaSet::AI_CriteriaSet(local_3c,"subject",pcVar4);
/* try { // try from 009a4571 to 009a4a3b has its CatchHandler @ 009a4a6f */
puVar5 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
local_48 = *puVar5;
local_4c = 2;
CAI_Concept::CAI_Concept(local_44,"SurvivorJockeyEnded");
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,local_44,local_3c,0.0,
(CFollowupTargetSpec_t *)&local_4c,(CBaseEntity *)0x0);
uVar1 = *(uint *)(this + 0x30bc);
if (((uVar1 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar10 + 8) == uVar1 >> 0xc && (*(int *)(puVar10 + 4) != 0)))) {
this_01 = (CBaseAbility *)
__dynamic_cast(*(int *)(puVar10 + 4),&CBaseAbility::typeinfo,&CLeap::typeinfo,0);
if (this_01 != (CBaseAbility *)0x0) {
CBaseAbility::StartActivationTimer
(this_01,*(float *)(ZombieLeapIntervalPostRide._28_4_ + 0x2c),0.0);
}
}
iVar11 = (int)(*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x3ed0));
if (*(int *)(this + 0x39d8) < iVar11) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x39d8) = iVar11;
}
piVar7 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"jockey_ride_end",0,0);
if (piVar7 != (int *)0x0) {
pcVar3 = *(code **)(*piVar7 + 0x30);
uVar8 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar3)(piVar7,"userid",uVar8);
(**(code **)(*piVar7 + 0x38))
(piVar7,"ride_length",*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x3ed0));
pcVar3 = *(code **)(*piVar7 + 0x30);
uVar8 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this_00 + 0x30));
(*pcVar3)(piVar7,"victim",uVar8);
pcVar3 = *(code **)(*piVar7 + 0x30);
if (param_1 == (CTerrorPlayer *)0x0) {
uVar8 = 0;
}
else {
uVar8 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
}
(*pcVar3)(piVar7,"rescuer",uVar8);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar7,0);
}
puVar10 = g_pEntityList;
uVar1 = *(uint *)(this_00 + 0x3ee0);
if (((uVar1 != 0xffffffff) &&
(puVar9 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar9 + 8) == uVar1 >> 0xc && (*(int *)(puVar9 + 4) != 0)))) {
if (this_00[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar11 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar11 + 2) = 0;
puVar10 = g_pEntityList;
}
}
else {
this_00[0x70] = (CCSPlayer)((byte)this_00[0x70] | 1);
}
*(undefined4 *)(this_00 + 0x3ee0) = 0xffffffff;
}
uVar1 = *(uint *)(this + 0x3edc);
if ((((uVar1 != 0xffffffff) &&
(puVar10 = puVar10 + (uVar1 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar10 + 4) != 0)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar11 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar11 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x3edc) = 0xffffffff;
}
(**(code **)(*(int *)this + 0x98))(this,0,0xffffffff);
CBaseEntity::SetMoveType((CBaseEntity *)this,2,0);
CBaseAnimating::SetModelScale((CBaseAnimating *)this,1.0,0.0);
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 + 2.0 != *(float *)(this_00 + 0x2e68)) {
(**(code **)(*(int *)(this_00 + 0x2e60) + 4))(this_00 + 0x2e60,this_00 + 0x2e68);
*(float *)(this_00 + 0x2e68) = (float)lVar12 + 2.0;
}
if (*(float *)(this_00 + 0x2e64) != 2.0) {
(**(code **)(*(int *)(this_00 + 0x2e60) + 4))(this_00 + 0x2e60,this_00 + 0x2e64);
*(undefined4 *)(this_00 + 0x2e64) = 0x40000000;
}
piVar7 = (int *)CCSPlayer::GetActiveCSWeapon(this_00);
if (piVar7 != (int *)0x0) {
(**(code **)(*piVar7 + 0x424))(piVar7);
}
piVar7 = (int *)GetActiveTerrorWeapon(this);
if (piVar7 != (int *)0x0) {
(**(code **)(*piVar7 + 0x3f0))(piVar7,0xb3);
}
if (*(float *)(this + 0x3efc) != -1.0) {
(**(code **)(*(int *)(this + 0x3ef4) + 4))(this + 0x3ef4,this + 0x3efc);
*(undefined4 *)(this + 0x3efc) = 0xbf800000;
}
CBasePlayer::RumbleEffect((CBasePlayer *)this_00,'\'','\0','\x01');
CBasePlayer::RumbleEffect((CBasePlayer *)this,'\'','\0','\x01');
AI_CriteriaSet::~AI_CriteriaSet(local_3c);
return;
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.