]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix some warnings.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 7 Jan 2014 16:29:21 +0000 (16:29 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 7 Jan 2014 16:29:21 +0000 (16:29 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12041 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
host_cmd.c
protocol.c
prvm_cmds.h

index 4b6100f835a6ddc4c4253dad5c9a67ee298cabf4..f476d3c09e6d94a0d8c3a908f1013b52d17b4e02 100644 (file)
@@ -694,7 +694,9 @@ static void SCR_SetUpToDrawConsole (void)
 {
        // lines of console to display
        float conlines;
+#ifdef CONFIG_MENU
        static int framecounter = 0;
+#endif
 
        Con_CheckResize ();
 
@@ -707,8 +709,8 @@ static void SCR_SetUpToDrawConsole (void)
                        framecounter++;
        }
        else
-#endif
                framecounter = 0;
+#endif
 
        if (scr_conforcewhiledisconnected.integer && key_dest == key_game && cls.signon != SIGNONS)
                key_consoleactive |= KEY_CONSOLEACTIVE_FORCED;
index 733704aa2c48166b6e1079040d375c9f1bd3ae73..c9cf39c2e5f207ee6cdb63d95d3fd1bc54a3a9d5 100644 (file)
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "sv_demo.h"
 #include "image.h"
 
+#include "prvm_cmds.h"
 #include "utf8lib.h"
 
 // for secure rcon authentication
@@ -761,11 +762,6 @@ Host_Loadgame_f
 ===============
 */
 
-prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format);
-void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strindex, const char *str);
-void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer);
-void BufStr_Flush(prvm_prog_t *prog);
-
 static void Host_Loadgame_f (void)
 {
        prvm_prog_t *prog = SVVM_prog;
index 6a4e435e955886c68ffb2e090108e380a23cf6be..85db0877cb1311556d2dfcc924a0cf07d88bed6d 100644 (file)
@@ -521,6 +521,9 @@ qboolean EntityFrameCSQC_WriteFrame (sizebuf_t *msg, int maxsize, int numnumbers
                }
                else
                {
+                       // save the cursize value in case we overflow and have to rollback
+                       int oldcursize = msg->cursize;
+
                        // An update.
                        sendflags = client->csqcentitysendflags[number];
                        // Nothing to send? FINE.
@@ -531,8 +534,6 @@ qboolean EntityFrameCSQC_WriteFrame (sizebuf_t *msg, int maxsize, int numnumbers
                                sendflags = 0xFFFFFF;
 
                        // write an update
-                       // save the cursize value in case we overflow and have to rollback
-                       int oldcursize = msg->cursize;
                        if (PRVM_serveredictfunction(ed, SendEntity))
                        {
                                if(!sectionstarted)
index e21a393f6e0860b0a5a3e8b8a6660719ad2028e3..75589dea71efb7b4e843f55fc9fc5dbb30ac8938 100644 (file)
@@ -217,11 +217,15 @@ float     getserverlistindexforkey(string key)
 // init code
 void PR_Cmd_Init(void);
 
-// builtins and other general functions
-
+// general functions
 void VM_CheckEmptyString (prvm_prog_t *prog, const char *s);
 void VM_VarString(prvm_prog_t *prog, int first, char *out, int outlength);
+prvm_stringbuffer_t *BufStr_FindCreateReplace (prvm_prog_t *prog, int bufindex, int flags, char *format);
+void BufStr_Set(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer, int strindex, const char *str);
+void BufStr_Del(prvm_prog_t *prog, prvm_stringbuffer_t *stringbuffer);
+void BufStr_Flush(prvm_prog_t *prog);
 
+// builtins
 void VM_checkextension (prvm_prog_t *prog);
 void VM_error (prvm_prog_t *prog);
 void VM_objerror (prvm_prog_t *prog);