shithub: choc

Download patch

ref: 5674a4e6f31616c3cd4ce725ef54086689245ebc
parent: 788892b95805a7d54e2b8ed92ed8262a7b9c6d47
author: James Haley <[email protected]>
date: Thu Jun 30 00:07:25 EDT 2011

Two changes:
* Be vanilla-compatible with callpoint to M_Ticker.
* Use a temporary screen buffer for screen wipes to avoid overdrawing
  the screen during the fade process. This didn't happen in vanilla due
  to its refresh system.

Subversion-branch: /branches/strife-branch
Subversion-revision: 2352

--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -165,10 +165,13 @@
 	I_StartTic ();
 	D_ProcessEvents ();
 
+#if 0
         // Always run the menu
+        // - jhaley 20110629 [CHOCOFIX] - sure, if you want to cause serious 
+        //   problems. See TryRunTics for where the call to M_Ticker belongs.
 
         M_Ticker ();
-
+#endif
         if (drone)
         {
             // In drone mode, do not generate any ticcmds.
@@ -608,6 +611,11 @@
 	    if (advancedemo)
 		D_DoAdvanceDemo ();
 
+            // [STRIFE]/[CHOCOFIX] jhaley 20110629 Chocolate compatibility problem!
+            // *Somebody* moved M_Ticker to NetUpdate where it specifically does not
+            // belong. It *must* be here. All it ever does is animate the cursor
+            // anyway so there is absolutely no reason to run it from NetUpdate.
+            M_Ticker (); 
 	    G_Ticker ();
 	    gametic++;
 	    
--- a/src/strife/f_wipe.c
+++ b/src/strife/f_wipe.c
@@ -277,8 +277,9 @@
     if (!go)
     {
 	go = 1;
-	// wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // DEBUG
-	wipe_scr = I_VideoBuffer;
+        // haleyjd 20110629 [STRIFE]: We *must* use a temp buffer here.
+	wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // DEBUG
+	//wipe_scr = I_VideoBuffer;
 	(*wipes[wipeno*3])(width, height, ticks);
     }
 
@@ -285,7 +286,9 @@
     // do a piece of wipe-in
     V_MarkRect(0, 0, width, height);
     rc = (*wipes[wipeno*3+1])(width, height, ticks);
-    //  V_DrawBlock(x, y, 0, width, height, wipe_scr); // DEBUG
+
+    // haleyjd 20110629 [STRIFE]: Copy temp buffer to the real screen.
+    V_DrawBlock(x, y, width, height, wipe_scr);
 
     // final stuff
     if (rc)