From 1c53fe91c2c9e12f79014e9c56c6e00d03f5e6e7 Mon Sep 17 00:00:00 2001 From: driAn Date: Thu, 15 May 2008 20:19:39 +0000 Subject: [PATCH] delay after grenade activation git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1982 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/weapon.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 313409c7..9d9fd54e 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -641,6 +641,7 @@ bool grenades::attack(vec &targ) vec &to = targ; bool waitdone = attackmillis>=gunwait; + if(waitdone) gunwait = reloading = 0; switch(state) { @@ -669,8 +670,6 @@ bool grenades::attack(vec &targ) } break; } - - if(waitdone) gunwait = reloading = 0; return true; } @@ -701,8 +700,10 @@ void grenades::activatenade(const vec &to) { if(!mag) return; throwmillis = 0; + inhandnade = new grenadeent(owner); bounceents.add(inhandnade); + updatelastaction(owner); mag--; gunwait = info.attackdelay;