From 758a8ab98abccab10af99c5bf22fd9cd9da6234b Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 2 Jan 2006 22:55:56 +0000 Subject: [PATCH] Fixes a crash on +setrenderer dedicated servers. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1773 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/plugin.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/engine/common/plugin.c b/engine/common/plugin.c index b16486baa..eb0f42bcd 100644 --- a/engine/common/plugin.c +++ b/engine/common/plugin.c @@ -107,6 +107,7 @@ typedef int (VARGS *Plug_Builtin_t)(void *offset, unsigned int mask, const long void Plug_RegisterBuiltin(char *name, Plug_Builtin_t bi, int flags); #define PLUG_BIF_DLLONLY 1 #define PLUG_BIF_QVMONLY 2 +#define PLUG_BIF_NEEDSRENDERER 4 #include "netinc.h" @@ -335,11 +336,9 @@ int Plug_Emumerated (char *name, int size, void *param) int VARGS Plug_Con_Print(void *offset, unsigned int mask, const long *arg) { -#ifndef SERVERONLY - Con_Print((char*)VM_POINTER(arg[0])); -#else + if (qrenderer <= 0) + return false; Con_Printf("%s", (char*)VM_POINTER(arg[0])); -#endif return 0; } int VARGS Plug_Sys_Error(void *offset, unsigned int mask, const long *arg)