fix "grenades" script

This commit is contained in:
ac-stef
2015-03-20 17:11:48 +01:00
parent 13ed2bd977
commit abdf080ae9
+2 -2
View File
@@ -163,7 +163,7 @@ const secondary [ weapon PISTOL ]
const sndtoggle [ ptoggle secondary ]
const melee [ weapon KNIFE ]
const knftoggle [ ptoggle melee ]
const grenades [ weapon GRENADES ]
const grenades [ weapon GRENADE ]
const gndtoggle [ ptoggle grenades ]
const altaction [ (concatword altaction_ (curweapon)) ]
@@ -173,7 +173,7 @@ const checkrange [ result (&& (>=f $arg1 $arg2) (<=f $arg1 $arg3)) ]
loop i $NUM_WEAPONS [ (concatword altaction_ $i) = quicknadethrow ] // Quick nade throw is default
// Use format to define altaction_N aliases from now on, makes for less edits in the future if weapon IDs change. - Bukz
// (format altaction_%1 (getgunindex knife)) = [ if (checkmag (currentprimary)) primary [ if (|| (checkmag PISTOL) (checkmag AKIMBO)) secondary [ if (checkmag GRENADES) grenades ] ] ] // Knife // uncomment to switch to primary/secondary/grenades with MOUSE2 depending on ammo content for each.
// (format altaction_%1 (getgunindex knife)) = [ if (checkmag (currentprimary)) primary [ if (|| (checkmag PISTOL) (checkmag AKIMBO)) secondary [ if (checkmag GRENADE) grenades ] ] ] // Knife // uncomment to switch to primary/secondary/grenades with MOUSE2 depending on ammo content for each.
(format altaction_%1 (getgunindex sniper)) = [ setscope 1; onrelease [ setscope 0 ] ] // Sniper
// (format altaction_%1 (getgunindex cpistol)) = [ setburst 1; onrelease [ setburst 0 ] ] // Combat pistol // TODO uncomment when this becomes a priority/testing, for now lets save an unused alias - Bukz
// (format altaction_%1 (getgunindex grenades)) = attack // Grenade // with this comment, you throw the nade and the nade is unselected : Brahma