]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/portals.qc
Make most server includes order insensitive
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / portals.qc
index 008dd7a1a2ddae55577473c64e8e73d300a5d7f3..e82c049a3a476fe90eff551cf1ddf60868c2ca53 100644 (file)
@@ -1,23 +1,18 @@
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qc"
-    #include "../dpdefs/dpextensions.qc"
-    #include "sys-post.qh"
-    #include "../warpzonelib/anglestransform.qh"
-    #include "../warpzonelib/util_server.qh"
-    #include "../common/constants.qh"
-    #include "../common/util.qh"
-    #include "../common/weapons/weapons.qh"
-    #include "autocvars.qh"
-    #include "defs.qh"
-    #include "../common/notifications.qh"
-    #include "../common/deathtypes.qh"
-    #include "mutators/mutators_include.qh"
-    #include "../csqcmodellib/sv_model.qh"
-    #include "portals.qh"
-    #include "g_hook.qh"
-#endif
+#include "portals.qh"
+#include "_.qh"
+
+#include "g_hook.qh"
+#include "g_subs.qh"
+#include "mutators/mutators_include.qh"
+#include "t_teleporters.qh"
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/notifications.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/sv_model.qh"
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/util_server.qh"
 
 #define PORTALS_ARE_NOT_SOLID
 
@@ -34,9 +29,9 @@ float PlayerEdgeDistance(entity p, vector v)
 {
        vector vbest;
 
-       if(v.x < 0) vbest_x = p.mins.x; else vbest_x = p.maxs.x;
-       if(v.y < 0) vbest_y = p.mins.y; else vbest_y = p.maxs.y;
-       if(v.z < 0) vbest_z = p.mins.z; else vbest_z = p.maxs.z;
+       if(v.x < 0) vbest.x = p.mins.x; else vbest.x = p.maxs.x;
+       if(v.y < 0) vbest.y = p.mins.y; else vbest.y = p.maxs.y;
+       if(v.z < 0) vbest.z = p.mins.z; else vbest.z = p.maxs.z;
 
        return vbest * v;
 }
@@ -57,7 +52,7 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
 
        // PLAYERS use different math
 #ifndef POSITIVE_PITCH_IS_DOWN
-       ang_x = -ang.x;
+       ang.x = -ang.x;
 #endif
 
        //print("reference: ", vtos(AnglesTransform_ApplyToVAngles(transform, ang)), "\n");
@@ -87,7 +82,7 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
                ang = fixedvectoangles(new_forward); // this still gets us a nice pitch value...
                if(new_up * new_yawforward < 0)
                        new_up = -1 * new_up;
-               ang_y = vectoyaw(new_up); // this vector is the yaw we want
+               ang.y = vectoyaw(new_up); // this vector is the yaw we want
                //print("UP/DOWN path: ", vtos(ang), "\n");
        }
        else
@@ -98,9 +93,9 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
        }
 
 #ifndef POSITIVE_PITCH_IS_DOWN
-       ang_x = -ang.x;
+       ang.x = -ang.x;
 #endif
-       ang_z = vangle.z;
+       ang.z = vangle.z;
        return ang;
 }
 
@@ -431,7 +426,7 @@ void Portal_Remove(entity portal, float killed)
        }
 }
 
-void Portal_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void Portal_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(deathtype == DEATH_TELEFRAG)
                return;