X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fphysics.qh;h=92891ead255826e5c52445ab90bd18cbca5c5a60;hb=af5bcb8e69e8bb70e0e08b92f68c39e4481ed1da;hp=9c1bed68f4cfee9204c14068731e8ed6d1294206;hpb=ce88347ded497cb5a415c6e254e4230709a2c527;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/physics.qh b/qcsrc/common/physics.qh index 9c1bed68f..92891ead2 100644 --- a/qcsrc/common/physics.qh +++ b/qcsrc/common/physics.qh @@ -12,7 +12,11 @@ .float lastflags; .float lastground; .float wasFlying; +#ifdef SVQC +.float spectatorspeed = _STAT(SPECTATORSPEED); +#elif defined(CSQC) .float spectatorspeed; +#endif .vector movement_old; .float buttons_old; @@ -55,8 +59,6 @@ bool IsFlying(entity a); #define PHYS_FROZEN(s) STAT(FROZEN, s) -#define PHYS_GRAVITY(s) STAT(MOVEVARS_GRAVITY, s) - #define PHYS_HIGHSPEED STAT(MOVEVARS_HIGHSPEED, this) #define PHYS_JETPACK_ACCEL_SIDE STAT(JETPACK_ACCEL_SIDE, this) @@ -93,6 +95,9 @@ bool IsFlying(entity a); #ifdef CSQC + string autocvar_cl_jumpspeedcap_min; + string autocvar_cl_jumpspeedcap_max; + noref float pmove_waterjumptime; const int FL_WATERJUMP = 2048; // player jumping out of water @@ -108,12 +113,15 @@ bool IsFlying(entity a); // TODO #define IS_CLIENT(s) (s).isplayermodel #define IS_PLAYER(s) (s).isplayermodel - #define isPushable(s) (s).isplayermodel + #define IS_NOT_A_CLIENT(s) !(s).isplayermodel + #define isPushable(s) ((s).isplayermodel || (s).pushable || ((s).flags & FL_PROJECTILE)) //float player_multijump; //float player_jumpheight; - #define PHYS_TELEPORT_TIME(s) pmove_waterjumptime + #define PHYS_GRAVITY(s) STAT(MOVEVARS_GRAVITY, s) + + #define PHYS_TELEPORT_TIME(s) s.teleport_time #define TICRATE ticrate @@ -162,8 +170,8 @@ bool IsFlying(entity a); #define ITEMS_STAT(s) (s).items - #define PHYS_JUMPSPEEDCAP_MIN cvar_string("cl_jumpspeedcap_min") - #define PHYS_JUMPSPEEDCAP_MAX cvar_string("cl_jumpspeedcap_max") + #define PHYS_JUMPSPEEDCAP_MIN autocvar_cl_jumpspeedcap_min + #define PHYS_JUMPSPEEDCAP_MAX autocvar_cl_jumpspeedcap_max #define PHYS_CL_TRACK_CANJUMP(s) STAT(MOVEVARS_CL_TRACK_CANJUMP, s) // FIXME: 0 doesn't mean zero gravity @@ -177,10 +185,13 @@ bool IsFlying(entity a); .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED); /** Not real stats */ - .string stat_jumpspeedcap_min, stat_jumpspeedcap_max; + .string jumpspeedcap_min; + .string jumpspeedcap_max; #define PHYS_TELEPORT_TIME(s) s.teleport_time + #define PHYS_GRAVITY(s) autocvar_sv_gravity + #define TICRATE sys_frametime #define PHYS_INPUT_ANGLES(s) s.v_angle