summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-04-06 15:17:01 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-04-06 22:20:59 +0200
commita45a033cebd101eee142f15cfde2e643b7404b01 (patch)
treec000eaeea4552eb4225b93d53d1cddf33a5ce88c /src
parent75984e5d13ae2020fbac8a00748bc17d2a932f57 (diff)
Fix compilation of game.qvm
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_lib.c4
-rw-r--r--src/game/bg_lib.h1
-rw-r--r--src/game/g_client.c3
3 files changed, 6 insertions, 2 deletions
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)))
{