]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use .groundentity (compatibility with engine)
authorMario <mario@smbclan.net>
Fri, 29 Jul 2016 23:14:56 +0000 (09:14 +1000)
committerMario <mario@smbclan.net>
Fri, 29 Jul 2016 23:14:56 +0000 (09:14 +1000)
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/common/physics/movetypes/toss.qc
qcsrc/common/physics/movetypes/walk.qc

index ccdf2e70397b483f0e493bce1eb4933b38c5ca38..090144dd16069f16573489d72f8a8cae53c7cdb0 100644 (file)
@@ -122,7 +122,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                                }
 
                                SET_ONGROUND(this);
-                               this.move_groundentity = trace_ent;
+                               this.groundentity = trace_ent;
                        }
                }
                else if(stepheight)
@@ -502,7 +502,7 @@ float _Movetype_PushEntity(entity this, vector push, bool failonstartsolid)  //
        this.origin = trace_endpos;
 
        if(trace_fraction < 1)
-               if(this.solid >= SOLID_TRIGGER && (!IS_ONGROUND(this) || (this.move_groundentity != trace_ent)))
+               if(this.solid >= SOLID_TRIGGER && (!IS_ONGROUND(this) || (this.groundentity != trace_ent)))
                        _Movetype_Impact(this, trace_ent);
 
        return trace_fraction;
index cd0f09c213b9fe4c4d5cd86d6c98383cc32859d3..6b75d81c02eac80ec652a958c0903eef7e936689 100644 (file)
@@ -33,7 +33,7 @@ void set_movetype(entity this, int mt);
 .entity aiment;
 .vector punchangle;
 
-.entity move_groundentity;  // FIXME add move_groundnetworkentity?
+.entity groundentity;  // FIXME add move_groundnetworkentity?
 .float move_suspendedinair;
 .float move_didgravity;
 
@@ -79,6 +79,9 @@ const int MOVETYPE_FLY_WORLDONLY    = 33;
 
 const int FL_ITEM                   = 256;
 const int FL_ONGROUND                          = 512;
+#elif defined(SVQC)
+const int MOVETYPE_ANGLENOCLIP      = 1;
+const int MOVETYPE_ANGLECLIP        = 2;
 #endif
 
 const int MOVETYPE_FAKEPUSH         = 13;
index db3ff72daa84551704c9930ed0955e9f9a03e13d..4821e34f6ac8929ae610ddc00ab35cd188223ce6 100644 (file)
@@ -8,13 +8,13 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                {
                        UNSET_ONGROUND(this);
                }
-               else if (!this.move_groundentity)
+               else if (!this.groundentity)
                {
                        return;
                }
-               else if (this.move_suspendedinair && wasfreed(this.move_groundentity))
+               else if (this.move_suspendedinair && wasfreed(this.groundentity))
                {
-                       this.move_groundentity = NULL;
+                       this.groundentity = NULL;
                        return;
                }
        }
@@ -78,7 +78,7 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                        if (trace_plane_normal.z > 0.7 && d < bstop && d > -bstop)
                        {
                                SET_ONGROUND(this);
-                               this.move_groundentity = trace_ent;
+                               this.groundentity = trace_ent;
                                this.velocity = '0 0 0';
                                this.avelocity = '0 0 0';
                        }
@@ -93,7 +93,7 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                        if (trace_plane_normal.z > 0.7)
                        {
                                SET_ONGROUND(this);
-                               this.move_groundentity = trace_ent;
+                               this.groundentity = trace_ent;
                                if (trace_ent.solid == SOLID_BSP)
                                        this.move_suspendedinair = true;
                                this.velocity = '0 0 0';
index 45b1dc39ccbe4c18a978a617bc7b90120df357b1..bf58ca5824419938d4b7ff5dd598273507860516 100644 (file)
@@ -61,7 +61,7 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
        vector originalvelocity = this.velocity;
        // originalmove_clip = clip;
        int originalflags = this.flags;
-       entity originalmove_groundentity = this.move_groundentity;
+       entity originalmove_groundentity = this.groundentity;
 
        // if move didn't block on a step, return
        if (clip & 2)
@@ -124,7 +124,7 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
                        this.velocity = originalvelocity;
                        // clip = originalmove_clip;
                        this.flags = originalflags;
-                       this.move_groundentity = originalmove_groundentity;
+                       this.groundentity = originalmove_groundentity;
                        // now try to unstick if needed
                        // clip = SV_TryUnstick (ent, oldvel);
                        return;
@@ -168,7 +168,7 @@ void _Movetype_Physics_Walk(entity this, float dt)  // SV_WalkMove
                this.origin = originalorigin;
                this.velocity = originalvelocity;
                this.flags = originalflags;
-               this.move_groundentity = originalmove_groundentity;
+               this.groundentity = originalmove_groundentity;
        }
 
        _Movetype_CheckVelocity(this);