summaryrefslogtreecommitdiff
path: root/source/sv_init.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2009-03-24 14:54:32 +0000
committerAndrey Nazarov <skuller@skuller.net>2009-03-24 14:54:32 +0000
commit385ccd0e9a518933019a8c6f1fecad2ae660b766 (patch)
tree6b86f96c16a6d89a5803fce5081af64ac76165ab /source/sv_init.c
parentfd8cba03f93046e892a732da27f221406f726b7c (diff)
Implemented a workaround for Q2 pmove bug resulting in swimming velocity in ‘z’ direction being heavily dependent of client's FPS when ‘+moveup’ is used.
New minor Q2PRO protocol version 1015. Fixed command completion mode cursor positioning. Disable ‘cl_updaterate’ variable until it is fully supported. Added ‘sv_waterjump_hack’ variable, enabling the pmove bug workaround described above for supported clients. Properly count connected MVD spectators in menus. Update MVD menus as spectators join/leave the channels.
Diffstat (limited to 'source/sv_init.c')
-rw-r--r--source/sv_init.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/sv_init.c b/source/sv_init.c
index e95210c..dbfaccf 100644
--- a/source/sv_init.c
+++ b/source/sv_init.c
@@ -36,6 +36,19 @@ void SV_ClientReset( client_t *client ) {
memset( &client->lastcmd, 0, sizeof( client->lastcmd ) );
}
+#if USE_FPS
+static void SV_SetFrameTime( void ) {
+ int i = sv_fps->integer / 10;
+
+ clamp( i, 1, 6 );
+
+ sv.frametime = 100 / i;
+ sv.framemult = i;
+
+ Cvar_SetInteger( sv_fps, i * 10, CVAR_SET_DIRECT );
+}
+#endif
+
/*
================
SV_SpawnServer
@@ -97,6 +110,9 @@ static void SV_SpawnServer( cm_t *cm, const char *server, const char *spawnpoint
//
// spawn the rest of the entities on the map
//
+#if USE_FPS
+ SV_SetFrameTime();
+#endif
// precache and static commands can be issued during
// map initialization