]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Merge branch 'master' into Mario/turrets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index 828812d613374ee60e92306b3a79d692d3199a5b..b753139c4615115c2f318c1efc86f18e77bb3935 100644 (file)
@@ -1,28 +1,25 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-    #include "defs.qh"
-    #include "../common/constants.qh"
-    #include "../common/stats.qh"
-    #include "../warpzonelib/client.qh"
-    #include "../common/teams.qh"
-    #include "../common/util.qh"
-    #include "../common/nades.qh"
-    #include "../common/weapons/weapons.qh"
-    #include "../common/mapinfo.qh"
-    #include "command/cl_cmd.qh"
-    #include "autocvars.qh"
-    #include "../common/notifications.qh"
-    #include "../csqcmodellib/interpolate.qh"
-    #include "hud.qh"
-    #include "waypointsprites.qh"
-    #include "prandom.qh"
-    #include "tturrets.qh"
-    #include "main.qh"
-    #include "../csqcmodellib/cl_model.qh"
-    #include "shownames.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "mapvoting.qh"
+#include "modeleffects.qh"
+#include "particles.qh"
+#include "scoreboard.qh"
+#include "shownames.qh"
+#include "target_music.qh"
+#include "tuba.qh"
+#include "wall.qh"
+#include "waypointsprites.qh"
+
+#include "vehicles/vehicles.qh"
+
+#include "../server/vehicles/bumblebee.qh"
+
+#include "../common/net_notice.qh"
+
+#include "../common/monsters/monsters.qh"
+
+#include "../common/turrets/cl_turrets.qh"
+#include "../common/turrets/turrets.qh"
+
+#include "../warpzonelib/client.qh"
 
 // --------------------------------------------------------------------------
 // BEGIN REQUIRED CSQC FUNCTIONS
@@ -113,6 +110,7 @@ void CSQC_Init(void)
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+       CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
@@ -132,7 +130,6 @@ void CSQC_Init(void)
        GibSplash_Precache();
        Casings_Precache();
        Vehicles_Precache();
-       turrets_precache();
        Tuba_Precache();
        CSQCPlayer_Precache();
 
@@ -163,8 +160,6 @@ void CSQC_Init(void)
        WarpZone_Init();
 
        hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin));
-       hud_configure_prev = -1;
-
        draw_currentSkin = strzone(strcat("gfx/menu/", cvar_string("menu_skin")));
 }
 
@@ -397,14 +392,12 @@ void Ent_Remove();
 
 void Ent_RemovePlayerScore()
 {
-       float i;
-
-       if(self.owner)
-       {
+       if(self.owner) {
                SetTeam(self.owner, -1);
                self.owner.gotscores = 0;
-               for(i = 0; i < MAX_SCORE; ++i)
+               for(int i = 0; i < MAX_SCORE; ++i) {
                        self.owner.(scores[i]) = 0; // clear all scores
+               }
        }
 }
 
@@ -517,9 +510,9 @@ void Ent_ClientData()
        if(f & 8)
        {
                angles_held_status = 1;
-               angles_held_x = ReadAngle();
-               angles_held_y = ReadAngle();
-               angles_held_z = 0;
+               angles_held.x = ReadAngle();
+               angles_held.y = ReadAngle();
+               angles_held.z = 0;
        }
        else
                angles_held_status = 0;
@@ -667,9 +660,9 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
 {
        float teamnum = (ReadByte() - 1);
        vector spn_origin;
-       spn_origin_x = ReadShort();
-       spn_origin_y = ReadShort();
-       spn_origin_z = ReadShort();
+       spn_origin.x = ReadShort();
+       spn_origin.y = ReadShort();
+       spn_origin.z = ReadShort();
 
        if(is_new)
        {