fix showed equipment in animation of dead player
1. Don't show grenade, only empty hands, if dead player didn't have any grenade in magazine. 2. Show pistol, instead of weapon "from" akimboendaction, if dead player had selected akimbo.
This commit is contained in:
@@ -1080,7 +1080,7 @@ void renderclientp(playerent *d)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
string vwep;
|
string vwep;
|
||||||
if(d->weaponsel) formatstring(vwep)("weapons/%s/world", d->weaponsel->info.modelname);
|
if(d->weaponsel && !(d->weaponsel->type == GUN_GRENADE && !d->mag[GUN_GRENADE])) formatstring(vwep)("weapons/%s/world", d->weaponsel->info.modelname);
|
||||||
else vwep[0] = 0;
|
else vwep[0] = 0;
|
||||||
renderclient(d, "playermodels", vwep[0] ? vwep : NULL, -(int)textureload(skin)->id);
|
renderclient(d, "playermodels", vwep[0] ? vwep : NULL, -(int)textureload(skin)->id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1686,7 +1686,8 @@ void checkakimbo()
|
|||||||
if(player1->akimbo)
|
if(player1->akimbo)
|
||||||
{
|
{
|
||||||
akimbo &a = *((akimbo *)player1->weapons[GUN_AKIMBO]);
|
akimbo &a = *((akimbo *)player1->weapons[GUN_AKIMBO]);
|
||||||
if(a.timerout() || player1->state == CS_DEAD || player1->state == CS_SPECTATE)
|
bool isdeadorspect = player1->state == CS_DEAD || player1->state == CS_SPECTATE;
|
||||||
|
if(a.timerout() || isdeadorspect)
|
||||||
{
|
{
|
||||||
weapon &p = *player1->weapons[GUN_PISTOL];
|
weapon &p = *player1->weapons[GUN_PISTOL];
|
||||||
player1->akimbo = false;
|
player1->akimbo = false;
|
||||||
@@ -1694,7 +1695,7 @@ void checkakimbo()
|
|||||||
|
|
||||||
if(player1->weaponsel->type==GUN_AKIMBO || (player1->weaponchanging && player1->nextweaponsel->type==GUN_AKIMBO))
|
if(player1->weaponsel->type==GUN_AKIMBO || (player1->weaponchanging && player1->nextweaponsel->type==GUN_AKIMBO))
|
||||||
{
|
{
|
||||||
switch(akimboendaction)
|
switch(isdeadorspect ? 1 : akimboendaction)
|
||||||
{
|
{
|
||||||
case 0: player1->weaponswitch(player1->weapons[GUN_KNIFE]); break;
|
case 0: player1->weaponswitch(player1->weapons[GUN_KNIFE]); break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -1747,7 +1748,7 @@ void checkakimbo()
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(player1->state != CS_DEAD && player1->state != CS_SPECTATE) audiomgr.playsoundc(S_AKIMBOOUT);
|
if(!isdeadorspect) audiomgr.playsoundc(S_AKIMBOOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user