Advertisement
Guest User

Untitled

a guest
Mar 11th, 2015
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.77 KB | None | 0 0
  1. int __cdecl CSurvivorDeathModel::Create(CTerrorPlayer *pPlayer)
  2. {
  3.   int v1; // ebx@1
  4.   int pNewDeathModel; // eax@3
  5.   void (__cdecl *v3)(_DWORD, _DWORD); // edi@4
  6.   int v4; // eax@4
  7.   int (__cdecl *v5)(_DWORD, _DWORD); // edi@4
  8.   unsigned __int8 v6; // al@4
  9.   int v7; // eax@4
  10.   int v8; // ST04_4@5
  11.   CTerrorPlayer *v9; // eax@6
  12.   CTerrorPlayer *v11; // ST1C_4@11
  13.   int v12; // eax@16
  14.   int v13; // [sp+8h] [bp-30h]@5
  15.  
  16.   v1 = 0;
  17.   if ( pPlayer )
  18.   {
  19.     if ( pPlayer->CBaseEntity.unknown328[1] & 8 )
  20.     {
  21.       CBaseEntity::CalcAbsolutePosition(pPlayer);
  22.       if ( pPlayer->CBaseEntity.unknown328[1] & 8 )
  23.         CBaseEntity::CalcAbsolutePosition(pPlayer);
  24.     }
  25.     pNewDeathModel = CBaseEntity::Create(
  26.                        "survivor_death_model",
  27.                        pPlayer->CBaseEntity.m_vecVelocity,
  28.                        &pPlayer->CBaseEntity.m_cellwidth,
  29.                        0);
  30.     v1 = pNewDeathModel;
  31.     if ( pNewDeathModel )
  32.     {
  33.       CSurvivorDeathModel::SetPlayer(pNewDeathModel, pPlayer);
  34.       v3 = *(*v1 + 36);
  35.       v4 = (pPlayer->vptr->IServerEntity.GetModelIndex)(pPlayer);
  36.       v3(v1, v4);
  37.       v5 = *(*v1 + 828);
  38.       v6 = (pPlayer->vptr->CCSPlayer.IsIncapacitated)(pPlayer);
  39.       v7 = v5(v1, 409 - (v6 >= 1u));
  40.       CBaseAnimating::SetSequence(v1, v7);
  41.       if ( 1.0 != *(v1 + 1128) )
  42.       {
  43.         if ( *(v1 + 108) )
  44.         {
  45.           *(v1 + 112) |= 1u;
  46.         }
  47.         else
  48.         {
  49.           v12 = *(v1 + 48);
  50.           if ( v12 )
  51.           {
  52.             *v12 |= 0x101u;
  53.             *(CBaseEdict::GetChangeAccessor(v12) + 2) = 0;
  54.           }
  55.         }
  56.         *(v1 + 1128) = 1065353216;
  57.       }
  58.       CCollisionProperty::SetSolid(v1 + 404, 2);
  59.       CBaseEntity::SetMoveType(v1, 3, 0);
  60.       CBaseEntity::SetFriction(v1, 1065353216);
  61.       v13 = (*(*g_pGameRules + 124))(g_pGameRules) + 48;
  62.       v8 = (*(*g_pGameRules + 124))(g_pGameRules) + 36;
  63.       CBaseEntity::SetCollisionBounds(v1);
  64.       if ( *(v1 + 261) )
  65.       {
  66.         (*(*v1 + 544))(v1, v1 + 261, v13);
  67.         *(v1 + 261) = 0;
  68.       }
  69.       CBaseEntity::SetCollisionGroup(v1, 1);
  70.       v9 = CTerrorPlayer::GetPlayerByCharacter(*(v1 + 6104));
  71.       if ( v9 )
  72.       {
  73.         if ( v9->CBaseEntity.unknown328[1] & 8 )
  74.         {
  75.           v11 = v9;
  76.           CBaseEntity::CalcAbsolutePosition(v9);
  77.           v9 = v11;
  78.         }
  79.         CBaseEntity::SetAbsOrigin(v1, v9->CBaseEntity.m_vecVelocity);
  80.       }
  81.       CBaseEntity::SetAbsVelocity(v1, &vec3_origin);
  82.       CCollisionProperty::SetSolidFlags(v1 + 404, *(v1 + 436) | 4);
  83.       (*(*v1 + 400))(v1, 2, v13);
  84.       CBaseAnimating::UseClientSideAnimation(v1);
  85.       VisibilityMonitor_AddEntity(v1, 1137180672, CSurvivorDeathModel::VisibilityMonitorCallback, 0);
  86.     }
  87.   }
  88.   return v1;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement