Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int __cdecl CSurvivorDeathModel::Create(CTerrorPlayer *pPlayer)
- {
- int v1; // ebx@1
- int pNewDeathModel; // eax@3
- void (__cdecl *v3)(_DWORD, _DWORD); // edi@4
- int v4; // eax@4
- int (__cdecl *v5)(_DWORD, _DWORD); // edi@4
- unsigned __int8 v6; // al@4
- int v7; // eax@4
- int v8; // ST04_4@5
- CTerrorPlayer *v9; // eax@6
- CTerrorPlayer *v11; // ST1C_4@11
- int v12; // eax@16
- int v13; // [sp+8h] [bp-30h]@5
- v1 = 0;
- if ( pPlayer )
- {
- if ( pPlayer->CBaseEntity.unknown328[1] & 8 )
- {
- CBaseEntity::CalcAbsolutePosition(pPlayer);
- if ( pPlayer->CBaseEntity.unknown328[1] & 8 )
- CBaseEntity::CalcAbsolutePosition(pPlayer);
- }
- pNewDeathModel = CBaseEntity::Create(
- "survivor_death_model",
- pPlayer->CBaseEntity.m_vecVelocity,
- &pPlayer->CBaseEntity.m_cellwidth,
- 0);
- v1 = pNewDeathModel;
- if ( pNewDeathModel )
- {
- CSurvivorDeathModel::SetPlayer(pNewDeathModel, pPlayer);
- v3 = *(*v1 + 36);
- v4 = (pPlayer->vptr->IServerEntity.GetModelIndex)(pPlayer);
- v3(v1, v4);
- v5 = *(*v1 + 828);
- v6 = (pPlayer->vptr->CCSPlayer.IsIncapacitated)(pPlayer);
- v7 = v5(v1, 409 - (v6 >= 1u));
- CBaseAnimating::SetSequence(v1, v7);
- if ( 1.0 != *(v1 + 1128) )
- {
- if ( *(v1 + 108) )
- {
- *(v1 + 112) |= 1u;
- }
- else
- {
- v12 = *(v1 + 48);
- if ( v12 )
- {
- *v12 |= 0x101u;
- *(CBaseEdict::GetChangeAccessor(v12) + 2) = 0;
- }
- }
- *(v1 + 1128) = 1065353216;
- }
- CCollisionProperty::SetSolid(v1 + 404, 2);
- CBaseEntity::SetMoveType(v1, 3, 0);
- CBaseEntity::SetFriction(v1, 1065353216);
- v13 = (*(*g_pGameRules + 124))(g_pGameRules) + 48;
- v8 = (*(*g_pGameRules + 124))(g_pGameRules) + 36;
- CBaseEntity::SetCollisionBounds(v1);
- if ( *(v1 + 261) )
- {
- (*(*v1 + 544))(v1, v1 + 261, v13);
- *(v1 + 261) = 0;
- }
- CBaseEntity::SetCollisionGroup(v1, 1);
- v9 = CTerrorPlayer::GetPlayerByCharacter(*(v1 + 6104));
- if ( v9 )
- {
- if ( v9->CBaseEntity.unknown328[1] & 8 )
- {
- v11 = v9;
- CBaseEntity::CalcAbsolutePosition(v9);
- v9 = v11;
- }
- CBaseEntity::SetAbsOrigin(v1, v9->CBaseEntity.m_vecVelocity);
- }
- CBaseEntity::SetAbsVelocity(v1, &vec3_origin);
- CCollisionProperty::SetSolidFlags(v1 + 404, *(v1 + 436) | 4);
- (*(*v1 + 400))(v1, 2, v13);
- CBaseAnimating::UseClientSideAnimation(v1);
- VisibilityMonitor_AddEntity(v1, 1137180672, CSurvivorDeathModel::VisibilityMonitorCallback, 0);
- }
- }
- return v1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement