]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/movetypes.qc
Merge branch 'Penguinum/Antiwall' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / movetypes.qc
index 334fefc2493ca22af7c4f651872e0969e0786651..beb6230dc541a969effd15505c17b911f7e16f01 100644 (file)
@@ -1,14 +1,12 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
-       #include "../common/stats.qh"
-       #include "../common/util.qh"
-       #include "movetypes.qh"
-       #include "../csqcmodellib/common.qh"
-       #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "movetypes.qh"
+#include "_all.qh"
+
+#include "t_items.qh"
+
+#include "../common/stats.qh"
+#include "../common/util.qh"
+
+#include "../csqcmodellib/common.qh"
 
 
 const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4;
@@ -24,14 +22,10 @@ void _Movetype_CheckVelocity() // SV_CheckVelocity
 
 float _Movetype_CheckWater(entity ent) // SV_CheckWater
 {
-       int supercontents;
-       float nativecontents;
-       vector point;
+       vector point = ent.move_origin;
+       point.z += (ent.mins.z + 1);
 
-       point = ent.move_origin;
-       point_z += (ent.mins.z + 1);
-
-       nativecontents = pointcontents(point);
+       int nativecontents = pointcontents(point);
 
        if(ent.move_watertype)
        if(ent.move_watertype != nativecontents)
@@ -44,7 +38,7 @@ float _Movetype_CheckWater(entity ent) // SV_CheckWater
        ent.move_waterlevel = 0;
        ent.move_watertype = CONTENT_EMPTY;
 
-       supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
+       int supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
        if(supercontents & DPCONTENTS_LIQUIDSMASK)
        {
                ent.move_watertype = nativecontents;
@@ -65,7 +59,7 @@ float _Movetype_CheckWater(entity ent) // SV_CheckWater
 void _Movetype_CheckWaterTransition(entity ent) // SV_CheckWaterTransition
 {
        float contents = pointcontents(ent.move_origin);
-       
+
        if(!ent.move_watertype)
        {
                // just spawned here