Upcasting args to cell before passing to MF_ExecuteForward
This commit is contained in:
parent
c8d69c41bc
commit
d2fb486e70
|
@ -117,9 +117,11 @@ void ClientKill(edict_t *pEntity){
|
|||
if ( !pPlayer->IsAlive())
|
||||
RETURN_META(MRES_IGNORED);
|
||||
|
||||
MF_ExecuteForward( iFDamage,pPlayer->index , pPlayer->index , 0, 0, 0, 0 );
|
||||
MF_ExecuteForward( iFDamage,static_cast<cell>(pPlayer->index), static_cast<cell>(pPlayer->index) ,
|
||||
static_cast<cell>(0), static_cast<cell>(0), static_cast<cell>(0), static_cast<cell>(0) ); // he would
|
||||
pPlayer->saveKill(pPlayer,0,0,0);
|
||||
MF_ExecuteForward( iFDeath,pPlayer->index, pPlayer->index, 0, 0, 0 );
|
||||
MF_ExecuteForward( iFDeath,static_cast<cell>(pPlayer->index), static_cast<cell>(pPlayer->index),
|
||||
static_cast<cell>(0), static_cast<cell>(0), static_cast<cell>(0) );
|
||||
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
@ -271,19 +273,19 @@ void StartFrame_Post(){
|
|||
if (g_bombAnnounce){
|
||||
switch (g_bombAnnounce){
|
||||
case BOMB_PLANTING:
|
||||
MF_ExecuteForward( iFBPlanting,g_Planter );
|
||||
MF_ExecuteForward( iFBPlanting, static_cast<cell>(g_Planter) );
|
||||
break;
|
||||
case BOMB_PLANTED:
|
||||
MF_ExecuteForward( iFBPlanted,g_Planter );
|
||||
MF_ExecuteForward( iFBPlanted, static_cast<cell>(g_Planter) );
|
||||
break;
|
||||
case BOMB_EXPLODE:
|
||||
MF_ExecuteForward( iFBExplode,g_Planter,g_Defuser );
|
||||
MF_ExecuteForward( iFBExplode, static_cast<cell>(g_Planter), static_cast<cell>(g_Defuser) );
|
||||
break;
|
||||
case BOMB_DEFUSING:
|
||||
MF_ExecuteForward( iFBDefusing,g_Defuser );
|
||||
MF_ExecuteForward( iFBDefusing, static_cast<cell>(g_Defuser) );
|
||||
break;
|
||||
case BOMB_DEFUSED:
|
||||
MF_ExecuteForward( iFBDefused,g_Defuser );
|
||||
MF_ExecuteForward( iFBDefused, static_cast<cell>(g_Defuser) );
|
||||
break;
|
||||
}
|
||||
g_bombAnnounce = 0;
|
||||
|
@ -313,7 +315,8 @@ void SetModel_Post(edict_t *e, const char *m){
|
|||
break;
|
||||
}
|
||||
if ( w_id )
|
||||
MF_ExecuteForward( iFGrenade, pPlayer->index, ENTINDEX(e) ,w_id );
|
||||
MF_ExecuteForward( iFGrenade, static_cast<cell>(pPlayer->index),
|
||||
static_cast<cell>(ENTINDEX(e)), static_cast<cell>(w_id));
|
||||
}
|
||||
|
||||
RETURN_META(MRES_IGNORED);
|
||||
|
|
|
@ -303,13 +303,16 @@ static cell AMX_NATIVE_CALL custom_wpn_dmg(AMX *amx, cell *params){ // wid,att,v
|
|||
int TA = 0;
|
||||
if ( (pVic->teamId == pAtt->teamId) && ( pVic != pAtt) )
|
||||
TA = 1;
|
||||
MF_ExecuteForward( iFDamage,pAtt->index, pVic->index, dmg, weapon, aim, TA );
|
||||
MF_ExecuteForward( iFDamage, static_cast<cell>(pAtt->index),
|
||||
static_cast<cell>(pVic->index), static_cast<cell>(dmg), static_cast<cell>(weapon),
|
||||
static_cast<cell>(aim), static_cast<cell>(TA) );
|
||||
|
||||
if ( pVic->IsAlive() )
|
||||
return 1;
|
||||
|
||||
pAtt->saveKill(pVic,weapon,( aim == 1 ) ? 1:0 ,TA);
|
||||
MF_ExecuteForward( iFDeath,pAtt->index, pVic->index, weapon, aim, TA );
|
||||
MF_ExecuteForward( iFDeath, static_cast<cell>(pAtt->index), static_cast<cell>(pVic->index),
|
||||
static_cast<cell>(weapon), static_cast<cell>(aim), static_cast<cell>(TA) );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -99,12 +99,14 @@ void Client_Damage_End(void* mValue){
|
|||
if ( (mPlayer->teamId == pAttacker->teamId) && (mPlayer != pAttacker) )
|
||||
TA = 1;
|
||||
|
||||
MF_ExecuteForward( iFDamage,pAttacker->index , mPlayer->index , damage, weapon, aim, TA );
|
||||
MF_ExecuteForward( iFDamage, static_cast<cell>(pAttacker->index) , static_cast<cell>(mPlayer->index) ,
|
||||
static_cast<cell>(damage), static_cast<cell>(weapon), static_cast<cell>(aim), static_cast<cell>(TA) );
|
||||
|
||||
if ( !mPlayer->IsAlive() ){
|
||||
if ( weapon != CSW_C4 )
|
||||
pAttacker->saveKill(mPlayer,weapon,( aim == 1 ) ? 1:0 ,TA);
|
||||
MF_ExecuteForward( iFDeath,pAttacker->index, mPlayer->index, weapon, aim, TA );
|
||||
MF_ExecuteForward( iFDeath, static_cast<cell>(pAttacker->index), static_cast<cell>(mPlayer->index),
|
||||
static_cast<cell>(weapon), static_cast<cell>(aim), static_cast<cell>(TA) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user