CTransitioningPlayer::Init
0x005220a0 · 1266 bytes · __thiscall
_ZN20CTransitioningPlayer4InitEPKciiiiiibbbb21SurvivorCharacterType
Decompiled
undefined (13 params)
/* CTransitioningPlayer::Init(char const*, int, int, int, int, int, int, bool, bool, bool, bool,
SurvivorCharacterType) */
void __thiscall
CTransitioningPlayer::Init
(CTransitioningPlayer *this,char *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,CTransitioningPlayer param_8,CTransitioningPlayer param_9,
CTransitioningPlayer param_10,CTransitioningPlayer param_11,int param_13)
{
CBaseEdict *pCVar1;
code *pcVar2;
int *piVar3;
int iVar4;
int iVar5;
undefined4 uVar6;
undefined4 uVar7;
undefined4 uVar8;
undefined4 uVar9;
undefined1 local_24 [20];
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(this + 0x78) = 0;
*(undefined4 *)(this + 0x74) = uVar6;
V_strncpy((char *)(this + 0x1a60),param_1,0x20);
if (param_4 != *(int *)(this + 0x1a48)) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x1a48) = param_4;
}
if (param_2 != *(int *)(this + 0x1a4c)) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x1a4c) = param_2;
}
if (param_3 != *(int *)(this + 0x1a50)) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x1a50) = param_3;
}
(**(code **)(*(int *)this + 0x194))(this,param_5);
if (param_6 != *(int *)(this + 0x100)) {
(**(code **)(*(int *)this + 0x214))(this,this + 0x100);
*(int *)(this + 0x100) = param_6;
}
if (*(int *)(this + 0x1a54) != param_7) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x1a54) = param_7;
}
if (this[0x1a5c] != param_8) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
this[0x1a5c] = param_8;
}
if (this[0x1a5d] != param_9) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
this[0x1a5d] = param_9;
}
if (this[0x1a5e] != param_10) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
this[0x1a5e] = param_10;
}
if (this[0x1a5f] != param_11) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
this[0x1a5f] = param_11;
}
if (*(int *)(this + 0x1a80) != param_13) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x1a80) = param_13;
}
if (*(int *)(this + 0x1a58) != 0) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1a58) = 0;
}
uVar9 = 0;
uVar8 = 0;
uVar7 = 0;
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)TransitionThink);
uVar6 = 0;
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0,uVar6,uVar7,uVar8,uVar9);
pcVar2 = *(code **)(*(int *)this + 0x254);
uVar6 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
(*pcVar2)(this,uVar6);
if ((param_5 == 2) && (*(int *)(this + 0x1a80) != 8)) {
(**(code **)(*(int *)this + 0x70))
(this,*(undefined4 *)(SurvivorModels + *(int *)(this + 0x1a80) * 4));
piVar3 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 005224e7 to 00522528 has its CatchHandler @ 005225e9 */
iVar4 = (**(code **)(*(int *)this + 0x340))(this,0x42d);
CBaseAnimating::SetSequence((CBaseAnimating *)this,iVar4);
iVar4 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar5 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
CBaseEntity::SetCollisionBounds
((CBaseEntity *)this,(Vector *)(iVar5 + 0xc),(Vector *)(iVar4 + 0x18));
/* WARNING: Could not recover jumptable at 0x00522538. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*piVar3 + 0x6c))();
return;
}
if (this[0x121] != (CTransitioningPlayer)0xa) {
if (this[0x6c] == (CTransitioningPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTransitioningPlayer)((byte)this[0x70] | 1);
}
this[0x121] = (CTransitioningPlayer)0xa;
}
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.