grenade timing fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1697 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-03-15 17:59:13 +00:00
parent 8b29c284d1
commit 1378b4e40b
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -740,12 +740,12 @@ struct grenades : weapon
void attackfx(vec &from, vec &to, int millis) // other player's grenades
{
throwmillis = millis;
throwmillis = lastmillis-millis;
if(millis == 0) playsound(S_GRENADEPULL, owner); // activate
else if(millis > 0) // throw
{
inhandnade = new grenadeent(owner, millis);
bounceents.add(inhandnade);
bounceents.add(inhandnade);
thrownade(from, to, inhandnade);
}
}
@@ -791,10 +791,9 @@ struct grenades : weapon
p->bouncestate = NADE_THROWED;
inhandnade = NULL;
throwmillis = lastmillis;
if(owner==player1)
{
throwmillis = lastmillis;
playsound(S_GRENADETHROW);
updatelastaction(player1);
addmsg(SV_THROWNADE, "ri7", int(p->o.x*DMF), int(p->o.y*DMF), int(p->o.z*DMF), int(p->vel.x*DMF), int(p->vel.y*DMF), int(p->vel.z*DMF), lastmillis-p->millis);