From 4fa5cdcda5c0c877f269e8dc78a7579829b12047 Mon Sep 17 00:00:00 2001 From: Thomas Brierley Date: Fri, 6 Apr 2018 00:57:34 +0100 Subject: [PATCH 1/2] Fix serverinfo overflow - reduce version cvar Mitigate the serverinfo overflow issue by reducing the version cvar length which is somewhat longer than the official engine by 33 chars. - Abbreviate PRODUCT_NAME to match official (will affect pid filenames) - Remove redundant product name from makeFile VERSION - Reduce git info to rev alone (commit date can be inferred from hash) Mitigates mickael9/ioq3#30 --- Makefile | 6 +++--- code/qcommon/q_shared.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1d8d7eed47..b0aa9a81f9 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,7 @@ endif export CROSS_COMPILING ifndef VERSION -VERSION=ioq3urt-mickael9 +VERSION=m9 endif ifndef CLIENTBIN @@ -288,9 +288,9 @@ endif # Add git version info USE_GIT= ifeq ($(wildcard .git),.git) - GIT_REV=$(shell git show -s --pretty=format:%h-%ad --date=short) + GIT_REV=$(shell git describe --always) ifneq ($(GIT_REV),) - VERSION:=$(VERSION)_GIT_$(GIT_REV) + VERSION:=$(VERSION)-$(GIT_REV) USE_GIT=1 endif endif diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 1e9306e7b1..2c4b057ae2 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // q_shared.h -- included first by ALL program modules. // A user mod should never modify this file -#define PRODUCT_NAME "ioQuake3-UrT" +#define PRODUCT_NAME "ioQ3-UrT" #define BASEGAME "q3ut4" #define CLIENT_WINDOW_TITLE "UrbanTerror" #define CLIENT_WINDOW_MIN_TITLE "UrbanTerror" From ca200e4ad23fcd724abae04935c6da5203ba5354 Mon Sep 17 00:00:00 2001 From: Benoit Lery Date: Tue, 10 Apr 2018 00:55:16 -0500 Subject: [PATCH 2/2] Fixed typo. The **q** in ioq3 is always lowercase! --- code/qcommon/q_shared.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 2c4b057ae2..5b14efb1e1 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // q_shared.h -- included first by ALL program modules. // A user mod should never modify this file -#define PRODUCT_NAME "ioQ3-UrT" +#define PRODUCT_NAME "ioq3-UrT" #define BASEGAME "q3ut4" #define CLIENT_WINDOW_TITLE "UrbanTerror" #define CLIENT_WINDOW_MIN_TITLE "UrbanTerror" @@ -474,7 +474,7 @@ int Q_isnan(float x); #endif /* // if your system does not have lrintf() and round() you can try this block. Please also open a bug report at bugzilla.icculus.org -// or write a mail to the ioq3 mailing list. +// or write a mail to the 3 mailing list. #else #define Q_ftol(v) ((long) (v)) #define Q_round(v) do { if((v) < 0) (v) -= 0.5f; else (v) += 0.5f; (v) = Q_ftol((v)); } while(0)