X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics.qh;h=6ea77fda90c7be395b29e83d87fc533b4b89b107;hb=64b8409b2d6fb93dc51ba24a82d219c8cd56a907;hp=b266c3c0f5373b30f60d7f93e311c84003c582fe;hpb=40ff16ae2704fe7ace9dc77ff5f6e4fa186e2539;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/physics.qh b/qcsrc/common/physics.qh index b266c3c0f..6ea77fda9 100644 --- a/qcsrc/common/physics.qh +++ b/qcsrc/common/physics.qh @@ -55,8 +55,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 +91,11 @@ 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 const int FL_JUMPRELEASED = 4096; // for jump debouncing @@ -106,11 +109,16 @@ bool IsFlying(entity a); // TODO #define IS_CLIENT(s) (s).isplayermodel #define IS_PLAYER(s) (s).isplayermodel + #define IS_NOT_A_CLIENT(s) !(s).isplayermodel #define isPushable(s) (s).isplayermodel //float player_multijump; //float player_jumpheight; + #define PHYS_GRAVITY(s) STAT(MOVEVARS_GRAVITY, s) + + #define PHYS_TELEPORT_TIME(s) s.teleport_time + #define TICRATE ticrate #define PHYS_INPUT_ANGLES(s) input_angles @@ -158,8 +166,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 @@ -173,7 +181,12 @@ 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