]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
csqc: Minor refactor of a few functions
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jul 2020 16:00:10 +0000 (16:00 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 13 Jul 2020 16:00:10 +0000 (16:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12799 d7cf8633-e32d-0410-b094-e92efae38249

csprogs.c

index fa1673b4c375254ab44b185e838041e289ad4505..ca9348c5c6bf64940297d31aaaaa72bfceb575bb 100644 (file)
--- 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];