From a45a033cebd101eee142f15cfde2e643b7404b01 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Mon, 6 Apr 2020 15:17:01 +0200 Subject: Fix compilation of game.qvm --- src/game/bg_lib.c | 4 ++++ src/game/bg_lib.h | 1 + src/game/g_client.c | 3 +-- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/bg_lib.c b/src/game/bg_lib.c index 69bca48..1af9107 100644 --- a/src/game/bg_lib.c +++ b/src/game/bg_lib.c @@ -830,6 +830,10 @@ double rint( double v ) return floor( v ); } +double round( double x ) { + return floor( x + 0.5 ); +} + // bk001127 - guarded this tan replacement // ld: undefined versioned symbol name tan@@GLIBC_2.0 double tan( double x ) diff --git a/src/game/bg_lib.h b/src/game/bg_lib.h index 962a625..cb5868d 100644 --- a/src/game/bg_lib.h +++ b/src/game/bg_lib.h @@ -106,6 +106,7 @@ void *memcpy( void *dest, const void *src, size_t count ); // Math functions double ceil( double x ); double floor( double x ); +double round( double x ); double sqrt( double x ); double sin( double x ); double cos( double x ); diff --git a/src/game/g_client.c b/src/game/g_client.c index d204831..ea4e5c9 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1438,6 +1438,7 @@ const char *ClientConnect( int clientNum, qboolean firstTime ) char ip[ 16 ] = {""}; char reason[ MAX_STRING_CHARS ] = {""}; int i; + schachtmeisterJudgement_t *smj = NULL; ent = &g_entities[ clientNum ]; @@ -1512,8 +1513,6 @@ const char *ClientConnect( int clientNum, qboolean firstTime ) strcmp( g_password.string, value ) != 0 ) return "Invalid password"; - schachtmeisterJudgement_t *smj = NULL; - if (!(G_admin_permission_guid(guid, ADMF_NOAUTOBAHN) || G_admin_permission_guid(guid, ADMF_IMMUNITY))) { -- cgit