From: cloudwalk Date: Mon, 13 Jul 2020 16:00:10 +0000 (+0000) Subject: csqc: Minor refactor of a few functions X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a9a80266c68508863f7b5e127f61936508c636f8;p=xonotic%2Fdarkplaces.git csqc: Minor refactor of a few functions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12799 d7cf8633-e32d-0410-b094-e92efae38249 --- 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];