inWater command, akimboautoswitch slider, akimboendaction defaults to 1 (switch back to primary)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6390 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -644,6 +644,10 @@ docargument [V] [Note: This is turned on by default.] [min 0/max 1/default 1];
|
||||
docident [survival] [Prepares a round of bot survival mode on the specified map.];
|
||||
docargument [M] [the map to use] [] [0];
|
||||
docremark [All official maps are compatible with survival, if you want to play survival on a custom map, prior edits/additions to the script are necessary, such as adding a zone for that specific map.];
|
||||
docident [inWater] [Determines if the local player is standing in water or submerged.];
|
||||
docargument [T] [check if submerged instead?] [min 0/max 1/default 0] [0];
|
||||
docexample [if (inWater) [echo in water] [echo not in water]] [Example output: in water];
|
||||
docexample [if (inWater 1) [echo submerged] [echo not submerged]] [Example output: not submerged];
|
||||
docsection [Editing]
|
||||
docident [addpath1way1] [];
|
||||
docident [addpath1way2] [];
|
||||
|
||||
@@ -384,6 +384,7 @@ menuitem "Change to the enemy team" [ changeteam ]
|
||||
menuitem "Change weapon..." [ showmenu Weapons ]
|
||||
menuitem "Change player skin..." [ showmenu (at [CLA RVSF] (curteam)) ]
|
||||
menuitem "Edit kill messages" [ showmenu "Kill Messages" ]
|
||||
menuitemcheckbox "Auto switch to akimbo upon pickup: " "$akimboautoswitch" [ akimboautoswitch $arg1 ]
|
||||
menuitemslider "Akimbo end action: " 0 2 "$akimboendaction" 1 [ "Switch to pistol" "Switch to primary weapon" "Switch to grenades" ] [ akimboendaction $arg1 ]
|
||||
|
||||
__fontsetting = 0 // Initial setting for status of fonts so AC doesn't give errors.
|
||||
|
||||
@@ -2699,6 +2699,23 @@ Output:
|
||||
<scriptalias name="onLastMin">
|
||||
<description>If this alias exists, it will be automatically executed on the last minute remaining mark.</description>
|
||||
</scriptalias>
|
||||
|
||||
<command name="inWater">
|
||||
<description>Determines if the local player is standing in water or submerged.</description>
|
||||
<examples>
|
||||
<example>
|
||||
<code><![CDATA[if (inWater) [echo in water] [echo not in water]]]></code>
|
||||
<explanation>Example output: in water</explanation>
|
||||
</example>
|
||||
<example>
|
||||
<code><![CDATA[if (inWater 1) [echo submerged] [echo not submerged]]]></code>
|
||||
<explanation>Example output: not submerged</explanation>
|
||||
</example>
|
||||
</examples>
|
||||
<arguments>
|
||||
<argument token="T" description="check if submerged instead?" valueNotes="min 0/max 1/default 0"/>
|
||||
</arguments>
|
||||
</command>
|
||||
|
||||
</identifiers>
|
||||
</section>
|
||||
|
||||
@@ -766,7 +766,11 @@ void crouch(bool on)
|
||||
player1->trycrouch = on;
|
||||
}
|
||||
|
||||
|
||||
int inWater(int type = 0)
|
||||
{
|
||||
if(type ? hdr.waterlevel > player1->o.z : hdr.waterlevel > (player1->o.z - player1->eyeheight)) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
COMMAND(backward, ARG_DOWN);
|
||||
COMMAND(forward, ARG_DOWN);
|
||||
@@ -775,6 +779,7 @@ COMMAND(right, ARG_DOWN);
|
||||
COMMANDN(jump, jumpn, ARG_DOWN);
|
||||
COMMAND(attack, ARG_DOWN);
|
||||
COMMAND(crouch, ARG_DOWN);
|
||||
COMMAND(inWater, ARG_1EXP);
|
||||
|
||||
void fixcamerarange(physent *cam)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
VARP(autoreload, 0, 1, 1);
|
||||
VARP(akimboautoswitch, 0, 1, 1);
|
||||
VARP(akimboendaction, 0, 0, 2); // 0: stay with pistol, 1: back to primary, 2: grenade - all fallback to previous one w/o ammo for target
|
||||
VARP(akimboendaction, 0, 1, 2); // 0: stay with pistol, 1: back to primary, 2: grenade - all fallback to previous one w/o ammo for target
|
||||
struct sgray {
|
||||
int ds; // damage flag: outer, medium, center: SGSEGDMG_*
|
||||
vec rv; // ray vector
|
||||
|
||||
Reference in New Issue
Block a user