onPickup fix, onDisconnect, docs
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6606 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+12
-13
@@ -307,23 +307,23 @@ void pickupeffects(int n, playerent *d)
|
||||
if(identexists("onPickup"))
|
||||
{
|
||||
string o;
|
||||
itemstat tmp;
|
||||
itemstat *tmp = NULL;
|
||||
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_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;
|
||||
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);
|
||||
if(tmp)
|
||||
{
|
||||
formatstring(o)("onPickup %d %d", e.type - 3, m_lss && e.type == I_GRENADE ? 2 : tmp->add);
|
||||
execute(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
else audiomgr.playsound(is.sound, d);
|
||||
@@ -662,5 +662,4 @@ void syncentchanges(bool force)
|
||||
}
|
||||
changedents.setsize(0);
|
||||
lastentsync = lastmillis;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user