Make it compile with XONOTIC, too
authorMario <mario@smbclan.net>
Sun, 23 Oct 2016 04:42:26 +0000 (14:42 +1000)
committerMario <mario@smbclan.net>
Sun, 23 Oct 2016 04:42:26 +0000 (14:42 +1000)
qcsrc/Makefile
qcsrc/client/defs.qh
qcsrc/client/main.qc
qcsrc/common/constants.qh
qcsrc/common/net_linked.qh
qcsrc/lib/draw.qh
qcsrc/lib/net.qh
qcsrc/server/client.qc

index 916fe08..903d853 100644 (file)
@@ -7,7 +7,7 @@ WORKDIR ?= ../.tmp
 QCCFLAGS_WATERMARK ?= $(shell git describe --tags --dirty='~')
 VER = $(subst *,\*,$(QCCFLAGS_WATERMARK))
 NDEBUG ?= 1
-XONOTIC ?= 0
+XONOTIC ?= 1
 BUILD_MOD ?=
 
 ifndef ZIP
index 182f6ac..437e1dd 100644 (file)
@@ -27,7 +27,7 @@ float         dmg_take;
 .int team;
 .int team_size;
 
-float vid_conwidth, vid_conheight;
+float vid_conheight;
 int binddb;
 
 // QUALIFYING
@@ -88,7 +88,7 @@ vector lightning_shotorigin[4];
 float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power;
 #endif
 
-float servertime, serverprevtime, serverdeltatime;
+float serverprevtime, serverdeltatime;
 
 float ticrate;
 
index 9bcfd4e..36ca217 100644 (file)
@@ -15,6 +15,7 @@
 #include <common/mapinfo.qh>
 #include <common/minigames/cl_minigames.qh>
 #include <common/minigames/cl_minigames_hud.qh>
+#include <common/net_linked.qh>
 #include <common/net_notice.qh>
 #include <common/triggers/include.qh>
 #include <common/vehicles/all.qh>
index 133d0ca..f3acfed 100644 (file)
@@ -1,5 +1,7 @@
 #pragma once
 
+const int RANKINGS_CNT = 15;
+
 const int SPRITERULE_DEFAULT = 0;
 const int SPRITERULE_TEAMPLAY = 1;
 const int SPRITERULE_SPECTATOR = 2;
index a67550a..9cd2094 100644 (file)
@@ -20,7 +20,6 @@ const int RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
 const int RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
 const int RACE_NET_SERVER_RANKINGS = 11;
 const int RACE_NET_SERVER_STATUS = 12;
-const int RANKINGS_CNT = 15;
 
 REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
 #ifdef CSQC
index 52583ff..fbb4a09 100644 (file)
@@ -5,6 +5,8 @@
        #include "i18n.qh"
        #include "vector.qh"
 
+       float vid_conwidth;
+
        void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
        {
                // I want to draw a quad...
                drawstring_builtin(position, text, theScale, rgb, theAlpha, flag);
        }
 
-       float vid_conwidth; // TODO
        void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, int flag)
        {
                position.x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale.x);
index f0a9e81..56c80e0 100644 (file)
@@ -298,6 +298,7 @@ USING(Stream, int);
        #define APPROXPASTTIME_RANGE (64 * APPROXPASTTIME_ACCURACY_REQUIREMENT)
 
        #ifdef CSQC
+               float servertime;
                entity ReadCSQCEntity()
                {
                        int f = ReadShort();
@@ -319,7 +320,6 @@ USING(Stream, int);
                #define ReadVector() vec3(ReadFloat(), ReadFloat(), ReadFloat())
                #define ReadVector2D() vec3(ReadFloat(), ReadFloat(), 0)
 
-               float servertime; // TODO
                float ReadApproxPastTime()
                {
                        float dt = ReadByte();
index 554ef65..0c0070c 100644 (file)
@@ -36,6 +36,7 @@
 #include "weapons/weaponsystem.qh"
 
 #include "../common/net_notice.qh"
+#include "../common/net_linked.qh"
 #include "../common/physics/player.qh"
 
 #include "../common/items/_mod.qh"