]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/movetypes/movetypes.qc
Rename a few parameters and locals named x, y, z
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / movetypes / movetypes.qc
index 0b27f727a5ac6eb5e81ed95105a802bb0d17b2d5..f0df80cd5d52c044dd46563eb248ea976f3692ed 100644 (file)
@@ -1,10 +1,10 @@
+#include "movetypes.qh"
 #include "../player.qh"
 
 #if defined(CSQC)
        #include <client/defs.qh>
        #include <common/stats.qh>
        #include <common/util.qh>
-       #include "movetypes.qh"
        #include <lib/csqcmodel/common.qh>
        #include <common/t_items.qh>
 #elif defined(MENUQC)
@@ -19,9 +19,7 @@ void set_movetype(entity this, int mt)
        if (mt == MOVETYPE_PHYSICS || mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH) {
                this.move_qcphysics = false;
        }
-       if (!this.move_qcphysics) {
-               this.movetype = mt;
-       }
+       this.movetype = (this.move_qcphysics) ? MOVETYPE_NONE : mt;
 }
 #elif defined(CSQC)
 void set_movetype(entity this, int mt)
@@ -448,12 +446,12 @@ bool _Movetype_UnstickEntity(entity this)  // SV_UnstickEntity
         X(17)
         #undef X
         {
-            LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
+            LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)",
                 etof(this), this.classname, vtos(this.origin));
             return false;
         }
        }
-       LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)",
                etof(this), this.classname, vtos(this.origin));
        _Movetype_LinkEdict(this, true);
        return true;
@@ -512,9 +510,9 @@ void makevectors_matrix(vector myangles)  // AngleVectorsFLU
 {
        v_forward = v_right = v_up = '0 0 0';
 
-       float y = myangles.y * (M_PI * 2 / 360);
-       float sy = sin(y);
-       float cy = cos(y);
+       float yy = myangles.y * (M_PI * 2 / 360);
+       float sy = sin(yy);
+       float cy = cos(yy);
        float p = myangles.x * (M_PI * 2 / 360);
        float sp = sin(p);
        float cp = cos(p);
@@ -569,7 +567,7 @@ void _Movetype_Physics_Frame(entity this, float movedt)
        {
                case MOVETYPE_PUSH:
                case MOVETYPE_FAKEPUSH:
-                       LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!\n");
+                       LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
                        break;
                case MOVETYPE_NONE:
                        break;
@@ -609,7 +607,7 @@ void _Movetype_Physics_ClientFrame(entity this, float movedt)
        {
                case MOVETYPE_PUSH:
                case MOVETYPE_FAKEPUSH:
-                       LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!\n");
+                       LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
                        break;
                case MOVETYPE_NONE:
                        break;