From c0ff57d388e0d0ed201e58ceaea079b9cc338cbb Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 26 Aug 2005 23:55:09 +0000 Subject: [PATCH] small fixes to make stuff nicer, and more likly to build git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1253 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_ui.c | 13 ++----------- engine/client/keys.c | 6 ++++-- engine/common/common.c | 3 ++- engine/server/svq3_game.c | 10 ++++++++++ 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/engine/client/cl_ui.c b/engine/client/cl_ui.c index e61fa75f2..73864c886 100644 --- a/engine/client/cl_ui.c +++ b/engine/client/cl_ui.c @@ -4,18 +4,7 @@ #include "cl_master.h" #ifdef VM_UI - -#ifdef Q3CLIENT #include "clq3defs.h" -#else -typedef struct { - int handle; - int modificationCount; - float value; - int integer; - char string[256]; -} vmcvar_t; -#endif void GLDraw_ShaderImage (int x, int y, int w, int h, float s1, float t1, float s2, float t2, struct shader_s *pic); @@ -1028,7 +1017,9 @@ long UI_SystemCallsEx(void *offset, unsigned int mask, int fn, const long *arg) VM_LONG(ret) = 0; break; //out of bounds. } +#ifdef VM_CG Q_strncpyz(VM_POINTER(arg[1]), CG_GetConfigString(VM_LONG(arg[0])), VM_LONG(arg[2])); +#endif break; case UI_LAN_GETPINGQUEUECOUNT: //these four are master server polling. diff --git a/engine/client/keys.c b/engine/client/keys.c index 113800875..36b58248d 100644 --- a/engine/client/keys.c +++ b/engine/client/keys.c @@ -1221,17 +1221,19 @@ void Key_Event (int key, qboolean down) if (key == K_SHIFT) shift_down = down; -#ifdef CSQC_DAT //yes, csqc is allowed to steal the escape key. if (key != '`' && key != '~') if (key_dest == key_game) { +#ifdef CSQC_DAT if (CSQC_KeyPress(key, down)) //give csqc a chance to handle it. return; +#endif +#ifdef VM_CG if (CG_KeyPress(key, down)) return; - } #endif + } // // handle escape specialy, so the user can never unbind it diff --git a/engine/common/common.c b/engine/common/common.c index bfc52f5b2..456ec23c7 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -1429,7 +1429,7 @@ void COM_CleanUpPath(char *str) memmove(str, str+1, strlen(str+1)+1); critisize = 4; } - if(critisize) +/* if(critisize) { if (critisize == 1) //not a biggy, so not red. Con_Printf("Please fix file case on your files\n"); @@ -1440,6 +1440,7 @@ void COM_CleanUpPath(char *str) else if (critisize == 4) //AAAAHHHHH! (consider sys_error instead) Con_Printf("^1AAAAAAAHHHH! An absolute path!\n"); } +*/ } /* diff --git a/engine/server/svq3_game.c b/engine/server/svq3_game.c index 6eae940cd..f47d98b01 100644 --- a/engine/server/svq3_game.c +++ b/engine/server/svq3_game.c @@ -744,6 +744,9 @@ int EXPORT_FN Q3G_SystemCalls(int arg, ...) void SVQ3_ShutdownGame(void) { int i; + if (!q3gamevm) + return; + for (i = 0; i < MAX_CONFIGSTRINGS; i++) { if (svq3_configstrings[i]) @@ -757,11 +760,18 @@ void SVQ3_ShutdownGame(void) q3_sentities = NULL; BZ_Free(q3_snapshot_entities); q3_snapshot_entities = NULL; + + VM_Destroy(q3gamevm); + q3gamevm = NULL; } qboolean SVQ3_InitGame(void) { int i; + + if (sv.worldmodel->fromgame == fg_quake) + return false; //always fail on q1bsp + //clear out the configstrings for (i = 0; i < MAX_CONFIGSTRINGS; i++) {