better prevweapon tracking for grenade switch

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2461 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-08-31 18:24:55 +00:00
parent bd17e8b855
commit dfebf82451
+3 -4
View File
@@ -22,12 +22,11 @@ alias altaction [
]
alias quicknadethrow [
alias prevweapon (curweapon)
if (> (magcontent 6) 0) [
grenades
if (!= (curweapon) 6) [grenades]
attack
] []
onrelease [ sleep 1 [ weapon $prevweapon ] ]
]
onrelease [ sleep 1 [ if (= (curweapon) 6) [weapon (prevweapon)] ] ]
]
loop i 8 [ alias (concatword altaction_ $i) quicknadethrow ] // quick nade throw is default