testing onPickup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6595 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+36
-1
@@ -290,7 +290,42 @@ void pickupeffects(int n, playerent *d)
|
||||
if(d!=player1 && d->type!=ENT_BOT) return;
|
||||
if(&is)
|
||||
{
|
||||
if(d==player1) audiomgr.playsoundc(is.sound);
|
||||
if(d==player1)
|
||||
{
|
||||
audiomgr.playsoundc(is.sound);
|
||||
|
||||
/*
|
||||
onPickup arg1 legend:
|
||||
0 = pistol clips
|
||||
1 = ammo box
|
||||
2 = grenade
|
||||
3 = health pack
|
||||
4 = helmet
|
||||
5 = armour
|
||||
6 = akimbo
|
||||
*/
|
||||
if(identexists("onPickup"))
|
||||
{
|
||||
string o;
|
||||
itemstat tmp;
|
||||
switch(e.type)
|
||||
{
|
||||
case I_CLIPS: tmp = ammostats[GUN_PISTOL]; break;
|
||||
case I_AMMO: tmp = ammostats[player1->primary]; break;
|
||||
case I_GRENADE: tmp = ammostats[GUN_GRENADE]; break;
|
||||
case I_AKIMBO: tmp = ammostats[GUN_AKIMBO]; break;
|
||||
case I_HEALTH:
|
||||
case I_HELMET:
|
||||
case I_ARMOUR: tmp = powerupstats[e.type-I_HEALTH]; break;
|
||||
default: break;
|
||||
}
|
||||
if(m_lss && e.type == I_GRENADE)
|
||||
formatstring(o)("onPickup %d %d", e.type - 3, 2);
|
||||
else
|
||||
formatstring(o)("onPickup %d %d", e.type - 3, tmp);
|
||||
execute(o);
|
||||
}
|
||||
}
|
||||
else audiomgr.playsound(is.sound, d);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user