From ba7b3e1f1b0734fe596b8588e115f49a34f01ce1 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 23 Oct 2016 14:42:26 +1000 Subject: [PATCH] Make it compile with XONOTIC, too --- qcsrc/Makefile | 2 +- qcsrc/client/defs.qh | 4 ++-- qcsrc/client/main.qc | 1 + qcsrc/common/constants.qh | 2 ++ qcsrc/common/net_linked.qh | 1 - qcsrc/lib/draw.qh | 3 ++- qcsrc/lib/net.qh | 2 +- qcsrc/server/client.qc | 1 + 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 916fe08c9..903d8537e 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -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 diff --git a/qcsrc/client/defs.qh b/qcsrc/client/defs.qh index 182f6ace7..437e1dd75 100644 --- a/qcsrc/client/defs.qh +++ b/qcsrc/client/defs.qh @@ -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; diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 9bcfd4e7a..36ca21724 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 133d0caca..f3acfed4e 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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; diff --git a/qcsrc/common/net_linked.qh b/qcsrc/common/net_linked.qh index a67550aac..9cd2094a6 100644 --- a/qcsrc/common/net_linked.qh +++ b/qcsrc/common/net_linked.qh @@ -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 diff --git a/qcsrc/lib/draw.qh b/qcsrc/lib/draw.qh index 52583ff58..fbb4a09b5 100644 --- a/qcsrc/lib/draw.qh +++ b/qcsrc/lib/draw.qh @@ -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... @@ -121,7 +123,6 @@ 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); diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index f0a9e817d..56c80e02d 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -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(); diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 554ef656b..0c0070c48 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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" -- 2.39.2