]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove some seemingly useless includes from the movetype code, making it partially...
authorMario <mario@smbclan.net>
Wed, 28 Jun 2017 01:24:22 +0000 (11:24 +1000)
committerMario <mario@smbclan.net>
Wed, 28 Jun 2017 01:24:40 +0000 (11:24 +1000)
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/common/physics/movetypes/toss.qc
qcsrc/common/physics/player.qh

index 407a703cfc03c4c7aea711a0e4be505a42c58de7..995c65b4d322061a7f00d0b5f0899a4480af02a4 100644 (file)
@@ -1,16 +1,4 @@
 #include "movetypes.qh"
-#include "../player.qh"
-
-#if defined(CSQC)
-       #include <client/defs.qh>
-       #include <common/stats.qh>
-       #include <common/util.qh>
-       #include <lib/csqcmodel/common.qh>
-       #include <common/t_items.qh>
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include <server/autocvars.qh>
-#endif
 
 #ifdef SVQC
 void set_movetype(entity this, int mt)
@@ -48,7 +36,7 @@ void _Movetype_WallFriction(entity this, vector stepnormal)  // SV_WallFriction
 vector planes[MAX_CLIP_PLANES];
 int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight) // SV_FlyMove
 {
-       int blocked = 0, bumpcount;
+       int blocked = 0;
        int i, j, numplanes = 0;
        float time_left = dt, grav = 0;
        vector push;
@@ -73,7 +61,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
 
        original_velocity = primal_velocity = restore_velocity = this.velocity;
 
-       for(bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
+       for(int bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
        {
                if(this.velocity == '0 0 0')
                        break;
@@ -138,7 +126,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                                break;
                        }
                        float trace2_fraction = trace_fraction;
-                       steppush = '0 0 1' * (org_z - this.origin_z);
+                       steppush = '0 0 1' * (org.z - this.origin_z);
                        _Movetype_PushEntity(this, steppush, true);
                        if(trace_startsolid)
                        {
@@ -147,7 +135,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                        }
 
                        // accept the new position if it made some progress...
-                       if(fabs(this.origin_x - org_x) >= 0.03125 || fabs(this.origin_y - org_y) >= 0.03125)
+                       if(fabs(this.origin_x - org.x) >= 0.03125 || fabs(this.origin_y - org.y) >= 0.03125)
                        {
                                trace_endpos = this.origin;
                                time_left *= 1 - trace2_fraction;
index d26de7b964983d6c702c752fa20869ae35016a7f..712817386037581064666a4e9cd7ce5faca8590f 100644 (file)
@@ -7,6 +7,13 @@
 #define SET_ONSLICK(s)                                         ((s).flags |= FL_ONSLICK)
 #define UNSET_ONSLICK(s)                                       ((s).flags &= ~FL_ONSLICK)
 
+#define GAMEPLAYFIX_DOWNTRACEONGROUND(s)    STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, s)
+#define GAMEPLAYFIX_EASIERWATERJUMP(s)      STAT(GAMEPLAYFIX_EASIERWATERJUMP, s)
+#define GAMEPLAYFIX_STEPDOWN(s)             STAT(GAMEPLAYFIX_STEPDOWN, s)
+#define GAMEPLAYFIX_STEPMULTIPLETIMES(s)    STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
+#define GAMEPLAYFIX_UNSTICKPLAYERS(s)       STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
+#define GAMEPLAYFIX_WATERTRANSITION(s)                 STAT(GAMEPLAYFIX_WATERTRANSITION, s)
+
 #ifdef CSQC
 .float bouncestop;
 .float bouncefactor;
index 498852135b40fd0607ee78d1b86daff703e48ac5..71e7fa9d08c9032e14abe5bb9bdcd10824b84121 100644 (file)
@@ -1,5 +1,4 @@
 #include "toss.qh"
-#include "../player.qh"
 
 void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
 {
index 571d3c6cb4a009c864174bbc27997fc69f6dbf7a..0a9008b4eb5bfed26b3ba3be9929301d8896327b 100644 (file)
@@ -31,13 +31,6 @@ bool IsFlying(entity a);
 
 #define BUFFS_STAT(s)                       STAT(BUFFS, s)
 
-#define GAMEPLAYFIX_DOWNTRACEONGROUND(s)    STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, s)
-#define GAMEPLAYFIX_EASIERWATERJUMP(s)      STAT(GAMEPLAYFIX_EASIERWATERJUMP, s)
-#define GAMEPLAYFIX_STEPDOWN(s)             STAT(GAMEPLAYFIX_STEPDOWN, s)
-#define GAMEPLAYFIX_STEPMULTIPLETIMES(s)    STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
-#define GAMEPLAYFIX_UNSTICKPLAYERS(s)       STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
-#define GAMEPLAYFIX_WATERTRANSITION(s) STAT(GAMEPLAYFIX_WATERTRANSITION, s)
-
 #define PHYS_ACCELERATE(s)                  STAT(MOVEVARS_ACCELERATE, s)
 #define PHYS_AIRACCELERATE(s)               STAT(MOVEVARS_AIRACCELERATE, s)
 #define PHYS_AIRACCEL_QW(s)                 STAT(MOVEVARS_AIRACCEL_QW, s)