]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a few server-side cvars from the client
authorMario <mario@smbclan.net>
Sat, 19 Nov 2016 20:50:53 +0000 (06:50 +1000)
committerMario <mario@smbclan.net>
Sat, 19 Nov 2016 20:50:53 +0000 (06:50 +1000)
12 files changed:
qcsrc/common/_all.inc
qcsrc/common/constants.qh
qcsrc/common/mutators/mutator/damagetext/damagetext.qc
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qh
qcsrc/common/vehicles/vehicle/racer_weapon.qh
qcsrc/common/vehicles/vehicle/raptor_weapons.qh
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qh
qcsrc/common/weapons/all.qh
qcsrc/ecs/systems/physics.qc
qcsrc/lib/self.qh
qcsrc/lib/spawnfunc.qh
qcsrc/lib/warpzone/mathlib.qc

index 5177c9dfd17320b7a3bc4dfa577639a608637ba8..988413f7a9593f9e17efc9a51ad354ac823c71f4 100644 (file)
@@ -1,4 +1,4 @@
-float autocvar_net_connecttimeout = 30;
+noref float autocvar_net_connecttimeout = 30;
 
 #ifdef GAMEQC
 #include "anim.qc"
index f3acfed4e160eacdc64aa85a4a4dd469aa7bd833..0682b331f62e2d902c07f8c68b6ea2da9808114a 100644 (file)
@@ -247,6 +247,7 @@ const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
 const int SERVERFLAG_TEAMPLAY = 2;
 const int SERVERFLAG_PLAYERSTATS = 4;
 
+#ifdef SVQC
 // FIXME/EXPLAINME: why? Mario: because
 vector autocvar_sv_player_maxs = '16 16 45';
 vector autocvar_sv_player_mins = '-16 -16 -24';
@@ -255,6 +256,7 @@ vector autocvar_sv_player_crouch_maxs = '16 16 25';
 vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
 vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
 vector autocvar_sv_player_headsize = '24 24 12';
+#endif
 
 
 // a bit more constant
index 57b34fae4c59694f5f8860faddd2313b318c01bb..7f2b740ba56aa6e1d654644406f4f5e656d583a3 100644 (file)
@@ -12,7 +12,8 @@ const int DTFLAG_NO_POTENTIAL = BIT(5);
 
 REGISTER_MUTATOR(damagetext, true);
 
-#if defined(CSQC) || defined(MENUQC)
+// || defined(MENUQC)
+#if defined(CSQC)
 // no translatable cvar description please
 AUTOCVAR_SAVE(cl_damagetext,                        bool,   true,       "Draw damage dealt where you hit the enemy");
 AUTOCVAR_SAVE(cl_damagetext_format,                 string, "-{total}", "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health");
index d4ed9505b987646aaff37d154fbae1e34ebf6f47..e9c5bf41d002167c5f3b74b17d99de8fad0ad60a 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <common/weapons/_all.qh>
 
+#ifdef SVQC
 float autocvar_g_vehicle_bumblebee_cannon_cost = 2;
 float autocvar_g_vehicle_bumblebee_cannon_damage = 60;
 float autocvar_g_vehicle_bumblebee_cannon_radius = 225;
@@ -9,6 +10,7 @@ float autocvar_g_vehicle_bumblebee_cannon_refire = 0.2;
 float autocvar_g_vehicle_bumblebee_cannon_speed = 20000;
 float autocvar_g_vehicle_bumblebee_cannon_spread = 0.02;
 float autocvar_g_vehicle_bumblebee_cannon_force = -35;
+#endif
 
 #ifdef SVQC
 void bumblebee_fire_cannon(entity this, entity _gun, string _tagname, entity _owner);
index 51c20ef9d0244a4dd994b5ed00e4570d224e0b77..f8b18a86ff03aec6a5c1d3efe8519d37c558ee80 100644 (file)
@@ -15,6 +15,7 @@ REGISTER_WEAPON(RACER, NEW(RacerAttack));
 void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
 #endif
 
+#ifdef SVQC
 float autocvar_g_vehicle_racer_cannon_cost = 2;
 float autocvar_g_vehicle_racer_cannon_damage = 15;
 float autocvar_g_vehicle_racer_cannon_radius = 100;
@@ -33,3 +34,4 @@ float autocvar_g_vehicle_racer_rocket_refire = 3;
 
 float autocvar_g_vehicle_racer_rocket_climbspeed = 1600;
 float autocvar_g_vehicle_racer_rocket_locked_maxangle = 1.8;
+#endif
index 4260d4292ee47649ba2b8592756c2be0116e78aa..a7908d50d340829f44d903c59749aadd134e85f8 100644 (file)
@@ -26,7 +26,7 @@ CLASS(RaptorFlare, PortoLaunch)
 ENDCLASS(RaptorFlare)
 REGISTER_WEAPON(RAPTOR_FLARE, NEW(RaptorFlare));
 
-
+#ifdef SVQC
 float autocvar_g_vehicle_raptor_cannon_cost = 1;
 float autocvar_g_vehicle_raptor_cannon_damage = 10;
 float autocvar_g_vehicle_raptor_cannon_radius = 60;
@@ -51,3 +51,4 @@ float autocvar_g_vehicle_raptor_flare_refire = 5;
 float autocvar_g_vehicle_raptor_flare_lifetime = 10;
 float autocvar_g_vehicle_raptor_flare_chase = 0.9;
 float autocvar_g_vehicle_raptor_flare_range = 2000;
+#endif
index a1523045a6ca000ee6eab8119fead769288dc31f..199d9cfa47d8debf5d1d6b7d459af1b4cca7b9ad 100644 (file)
@@ -6,6 +6,7 @@
 void spiderbot_rocket_do(entity this);
 #endif
 
+#ifdef SVQC
 // 400 (x2) DPS
 float autocvar_g_vehicle_spiderbot_minigun_damage = 24;
 float autocvar_g_vehicle_spiderbot_minigun_refire = 0.06;
@@ -30,3 +31,4 @@ float autocvar_g_vehicle_spiderbot_rocket_health = 100;
 float autocvar_g_vehicle_spiderbot_rocket_noise = 0.2;
 float autocvar_g_vehicle_spiderbot_rocket_turnrate = 0.25;
 float autocvar_g_vehicle_spiderbot_rocket_lifetime = 20;
+#endif
index 9570e8c561aaac732a39ba63ae1a5d51fdbf68e9..a805ce5fd4210a014b938bcf41c7cf46df4ad034 100644 (file)
@@ -143,10 +143,12 @@ X(weaponreplace, string)
 X(weaponstartoverride, float)
 X(weaponstart, float)
 X(weaponthrowable, float)
+#ifdef SVQC
 X(reload_ammo, float)
 .float reloading_ammo = reload_ammo;
 X(reload_time, float)
 .float reloading_time = reload_time;
+#endif
 #undef X
 
 
index b25c93b2d3d3177342e8994b12a29b26ecceb7dd..0c18e58cf8a577335f67526aae0412c52534ad73 100644 (file)
@@ -160,9 +160,6 @@ void sys_phys_update(entity this, float dt)
 /** for players */
 void sys_phys_simulate(entity this, float dt)
 {
-       const vector g = -this.com_phys_gravity;
-       const bool jump = this.com_in_jump;
-
        if (!this.com_phys_ground && !this.com_phys_air) {
                // noclipping
                // flying
@@ -172,6 +169,7 @@ void sys_phys_simulate(entity this, float dt)
                UNSET_ONGROUND(this);
 
                if (this.com_phys_friction_air) {
+                       const vector g = -this.com_phys_gravity;
                        this.velocity_z += g.z / 2;
                        this.velocity = this.velocity * (1 - dt * this.com_phys_friction);
                        this.velocity_z += g.z / 2;
@@ -181,7 +179,7 @@ void sys_phys_simulate(entity this, float dt)
        if (this.com_phys_water) {
                // water jump only in certain situations
                // this mimics quakeworld code
-               if (jump && this.waterlevel == WATERLEVEL_SWIMMING && this.velocity_z >= -180 && !this.viewloc) {
+               if (this.com_in_jump && this.waterlevel == WATERLEVEL_SWIMMING && this.velocity_z >= -180 && !this.viewloc) {
                        vector yawangles = '0 1 0' * this.v_angle.y;
                        makevectors(yawangles);
                        vector forward = v_forward;
@@ -320,7 +318,7 @@ void sys_phys_simulate(entity this, float dt)
                                }
 
                                // holding jump button swims upward slowly
-                               if (jump && !this.viewloc) {
+                               if (this.com_in_jump && !this.viewloc) {
                                        // was:
                                        // lava: 50
                                        // slime: 80
index 43bd12314e53f246c25193e81a277dc53580f533..f4c246f33058997803e1291f243286cfce99362d 100644 (file)
@@ -48,7 +48,7 @@
 
 #define SELFWRAP(T, R, oldargs, args, forward) \
     .R oldargs T; \
-    .R oldargs __##T = T; \
+    noref .R oldargs __##T = T; \
     .R args self##T; \
     R T##_self oldargs { ENGINE_EVENT(); return this.self##T forward; }
 
index 4e3bc062d1bc78936bc7bb095b6e882f2a5cd380..e8aeaecae61f968bedd1f5ac640d7dce2e677b05 100644 (file)
@@ -29,7 +29,7 @@ noref bool require_spawnfunc_prefix;
 
        noref bool __spawnfunc_expecting;
        noref entity __spawnfunc_expect;
-       bool __spawnfunc_unreachable_workaround = true;
+       noref bool __spawnfunc_unreachable_workaround = true;
 
        #define spawnfunc_1(id) spawnfunc_2(id, FIELDS_UNION)
        #define spawnfunc_2(id, whitelist) \
index 868724fa8656bc0e7299e792316ee132ed289712..e190518275b9c407570efae466fbdcb7ef758898 100644 (file)
@@ -169,8 +169,7 @@ vector lgamma(float e)
 }
 float tgamma(float e)
 {
-       vector v;
-       v = lgamma(e);
+       vector v = lgamma(e);
        return exp(v.x) * v.y;
 }