add_definitions(-DXONOTIC=1)
add_definitions(-DNDEBUG=1)
+add_definitions(-DENABLE_EFFECTINFO=0)
+add_definitions(-DENABLE_DEBUGDRAW=0)
+add_definitions(-DENABLE_DEBUGTRACE=0)
find_package(Git REQUIRED)
if (DEFINED ENV{VERSION})
VER = $(subst *,\*,$(QCCFLAGS_WATERMARK))
NDEBUG ?= 1
XONOTIC ?= 1
+ENABLE_EFFECTINFO ?= 0
+ENABLE_DEBUGDRAW ?= 0
+ENABLE_DEBUGTRACE ?= 0
BUILD_MOD ?=
ifndef ZIP
-DXONOTIC=$(XONOTIC) \
-DWATERMARK="$(QCCFLAGS_WATERMARK)" \
-DNDEBUG=$(NDEBUG) \
+ -DENABLE_EFFECTINFO=$(ENABLE_EFFECTINFO) \
+ -DENABLE_DEBUGDRAW=$(ENABLE_DEBUGDRAW) \
+ -DENABLE_DEBUGTRACE=$(ENABLE_DEBUGTRACE) \
$(if $(BUILD_MOD), -DBUILD_MOD="$(BUILD_MOD)" -I$(BUILD_MOD), ) \
$(QCCDEFS_EXTRA)
// draw 2D entities
IL_EACH(g_drawables_2d, it.draw2d, it.draw2d(it));
Draw_ShowNames_All();
-#ifdef DEBUGDRAW
+#if ENABLE_DEBUGDRAW
Debug_Draw();
#endif
}
#endif
-#ifdef DEBUGDRAW
+#if ENABLE_DEBUGDRAW
#ifdef GAMEQC
/**
* 0: off
}
}
-#ifdef DEBUGTRACE
+#if ENABLE_DEBUGTRACE
REGISTER_STAT(TRACE_ENT, int)
#ifdef SVQC
bool autocvar_debugtrace;
}
#endif
-#ifdef EFFECTINFO_ENABLED
+#if ENABLE_EFFECTINFO
#include "effectinfo.qc"
#endif
ATTRIB(Client, taunt_soundtime, float, this.taunt_soundtime);
ATTRIB(Client, killcount, int, this.killcount);
ATTRIB(Client, version_mismatch, bool, this.version_mismatch);
+ ATTRIB(Client, version, int, this.version);
METHOD(Client, m_unwind, bool(Client this));
{
if (IS_CLIENT(caller))
{
- caller.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
+ CS(caller).version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
- if (caller.version < autocvar_gameversion_min || caller.version > autocvar_gameversion_max)
+ if (CS(caller).version < autocvar_gameversion_min || CS(caller).version > autocvar_gameversion_max)
{
CS(caller).version_mismatch = true;
ClientKill_TeamChange(caller, -2); // observe
float intermission_exittime;
float alreadychangedlevel;
-.float version;
-
// footstep interval
.float nextstep;
string GetClientVersionMessage(entity this)
{
if (CS(this).version_mismatch) {
- if(this.version < autocvar_gameversion) {
+ if(CS(this).version < autocvar_gameversion) {
return strcat("This is Xonotic ", autocvar_g_xonoticversion,
"\n^3Your client version is outdated.\n\n\n### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###\n\n\nPlease update!!!^8");
} else {
-DNDEBUG=1
-DXONOTIC=1
-DWATERMARK="\"$(git describe --tags --dirty='~')\""
+ -DENABLE_EFFECTINFO=0
+ -DENABLE_DEBUGDRAW=0
+ -DENABLE_DEBUGTRACE=0
)
QCCDEFS="${QCCDEFS[@]}"