From a9a80266c68508863f7b5e127f61936508c636f8 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Mon, 13 Jul 2020 16:00:10 +0000 Subject: [PATCH] csqc: Minor refactor of a few functions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12799 d7cf8633-e32d-0410-b094-e92efae38249 --- csprogs.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/csprogs.c b/csprogs.c index fa1673b4..ca9348c5 100644 --- a/csprogs.c +++ b/csprogs.c @@ -644,13 +644,8 @@ void CSQC_AddPrintText (const char *msg) { prvm_prog_t *prog = CLVM_prog; size_t i; - if(!cl.csqc_loaded) - { - Con_Print(msg); - return; - } CSQC_BEGIN - if(PRVM_clientfunction(CSQC_Parse_Print)) + if(cl.csqc_loaded && PRVM_clientfunction(CSQC_Parse_Print)) { // FIXME: is this bugged? i = strlen(msg)-1; @@ -678,13 +673,8 @@ void CL_VM_Parse_CenterPrint (const char *msg) { prvm_prog_t *prog = CLVM_prog; int restorevm_tempstringsbuf_cursize; - if(!cl.csqc_loaded) - { - SCR_CenterPrint(msg); - return; - } CSQC_BEGIN - if(PRVM_clientfunction(CSQC_Parse_CenterPrint)) + if(cl.csqc_loaded && PRVM_clientfunction(CSQC_Parse_CenterPrint)) { PRVM_clientglobalfloat(time) = cl.time; PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity]; -- 2.39.2