Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oid (*orig_CG_Obituary) ( );
- void HooK_CG_Obituary( )
- {
- entityState_t * ent = NULL;
- __asm mov ent, eax
- int iTarget = ent->otherEntityNum;
- int iAttacker = ent->otherEntityNum2;
- int iMod = ent->eventParm;
- clientInfo_t * ciTarget = NULL;
- clientInfo_t * ciAttacker = NULL;
- if( iTarget >= 0 && iTarget < MAX_CLIENTS )
- {
- ciTarget = &clientInfo[ iTarget ];
- // entity is dead
- cg_entities[ iTarget ].currentState.eFlags &= 1;
- //pBot->SetInvalidPlayer( iTarget );
- if( iAttacker >= 0 && iAttacker < MAX_CLIENTS )
- ciAttacker = &clientInfo[ iAttacker ];
- else
- iAttacker = ENTITYNUM_WORLD;
- if( ciAttacker && ciAttacker->clientNum == cg->clientNum )
- {
- if( ciTarget->clientNum == cg->clientNum )
- stats.Suicides++;
- else
- {
- if( ( iMod & 0xFFFFFF7F ) == 7 )
- {
- stats.TotalKills ++;
- stats.Bashes ++;
- }
- else if( ( iMod & 0xFFFFFF7F ) == 8 )
- {
- stats.TotalKills ++;
- stats.Headshots ++;
- //HSratio ++;
- }
- else
- stats.TotalKills ++;
- //KDratio++;
- }
- }
- else if( ciTarget->clientNum == cg->clientNum )
- stats.Deaths++;
- //KDratio++;
- }
- __asm mov eax, ent
- orig_CG_Obituary( );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement