X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qh;h=571d3c6cb4a009c864174bbc27997fc69f6dbf7a;hb=37d93db98a5ba0fec820dd7333b873087b341291;hp=9f540148deb9b8c08908376e644c4c5e93a862a0;hpb=4b20d0cb8846118d9cfd5031ef8ecf5c2b4256c0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/physics/player.qh b/qcsrc/common/physics/player.qh index 9f540148d..571d3c6cb 100644 --- a/qcsrc/common/physics/player.qh +++ b/qcsrc/common/physics/player.qh @@ -47,6 +47,7 @@ bool IsFlying(entity a); #define PHYS_AIRCONTROL_PENALTY(s) STAT(MOVEVARS_AIRCONTROL_PENALTY, s) #define PHYS_AIRCONTROL_POWER(s) STAT(MOVEVARS_AIRCONTROL_POWER, s) #define PHYS_AIRCONTROL_BACKWARDS(s) STAT(MOVEVARS_AIRCONTROL_BACKWARDS, s) +#define PHYS_AIRCONTROL_SIDEWARDS(s) STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, s) #define PHYS_AIRSPEEDLIMIT_NONQW(s) STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, s) #define PHYS_AIRSTOPACCELERATE(s) STAT(MOVEVARS_AIRSTOPACCELERATE, s) #define PHYS_AIRSTRAFEACCELERATE(s) STAT(MOVEVARS_AIRSTRAFEACCELERATE, s) @@ -97,6 +98,8 @@ bool IsFlying(entity a); #define UPWARD_VELOCITY_CLEARS_ONGROUND(s) STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND, s) +#define PHYS_SLICK_APPLYGRAVITY(s) STAT(SLICK_APPLYGRAVITY, s) + #define PHYS_INPUT_BUTTON_ATCK(s) PHYS_INPUT_BUTTON_BUTTON1(s) #define PHYS_INPUT_BUTTON_JUMP(s) PHYS_INPUT_BUTTON_BUTTON2(s) #define PHYS_INPUT_BUTTON_ATCK2(s) PHYS_INPUT_BUTTON_BUTTON3(s) @@ -119,6 +122,7 @@ STATIC_INIT(PHYS_INPUT_BUTTON_HOOK) #define PHYS_INPUT_BUTTON_PRYDON(s) PHYS_INPUT_BUTTON_BUTTON_PRYDON(s) #define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s) PHYS_INPUT_BUTTON_BUTTON9(s) #define PHYS_INPUT_BUTTON_JETPACK(s) PHYS_INPUT_BUTTON_BUTTON10(s) +#define PHYS_INPUT_BUTTON_DODGE(s) PHYS_INPUT_BUTTON_BUTTON11(s) #ifdef CSQC STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK) @@ -126,6 +130,12 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK) localcmd("alias +jetpack +button10\n"); localcmd("alias -jetpack -button10\n"); } + +STATIC_INIT(PHYS_INPUT_BUTTON_DODGE) +{ + localcmd("alias +dodge +button11\n"); + localcmd("alias -dodge -button11\n"); +} #endif // if more buttons are needed, start using impulse bits as buttons @@ -156,6 +166,7 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK) #define UNSET_JUMP_HELD(s) ((s).flags |= FL_JUMPRELEASED) #define WAS_ONGROUND(s) boolean((s).lastflags & FL_ONGROUND) +#define WAS_ONSLICK(s) boolean((s).lastflags & FL_ONSLICK) #define ITEMS_STAT(s) ((s).items) @@ -247,6 +258,8 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK) bool Physics_Valid(string thecvar); + void Physics_UpdateStats(entity this, float maxspd_mod); + .float stat_sv_airspeedlimit_nonqw = _STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW); .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED);