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:
Bukz
2011-04-29 14:04:41 +00:00
parent 88ee66ed67
commit 1e20bace2e
5 changed files with 29 additions and 2 deletions
+6 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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