Multiview 80% working


(Chruker) #1

Has anybody tried to enable the multiview feature?

The as-is appears be working. There are a few bugs, but the majority of the functionality is working.

With our combined effort we should be able to get it working.

Here is what I did:

  • Enabled MV_SUPPORT by adding it to the Preprocessor Definitions.
  • Changed a single line of code to get the mouse cursor working.
  • Changed two lines of code to get the ‘Press M for multiview’ displayed properly.

This is a diff of it all:

Index: cgame/cg_draw.c
===================================================================
--- cgame/cg_draw.c	(revision 75)
+++ cgame/cg_draw.c	(working copy)
@@ -2636,8 +2636,8 @@
 
 #ifdef MV_SUPPORT
 	str2 = BindingFromName( "mvactivate" );
-	str = va( CG_TranslateString( "- Press %s to %s multiview mode" ), str2, ((cg.mvTotalClients > 0) ? "disable" : "activate") );
-	CG_DrawStringExt( x, y, str, colorWhite, qtrue, qtrue, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 );
+	str = va( CG_TranslateString( "Press %s to %s multiview mode" ), str2, ((cg.mvTotalClients > 0) ? "disable" : "activate") );	// CHRUKER: b0xx
+	CG_DrawStringExt( 8, 190, str, colorWhite, qtrue, qtrue, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 0 );	// CHRUKER: b0xx
 	y += TINYCHAR_HEIGHT;
 #endif
 }
Index: cgame/cg_window.c
===================================================================
--- cgame/cg_window.c	(revision 75)
+++ cgame/cg_window.c	(working copy)
@@ -553,7 +553,7 @@
 	// Mouse cursor lays on top of everything
 	if(cg.mvTotalClients > 0 && cg.time < cgs.cursorUpdate && fAllowMV) {
 		//CG_DrawPic(cgs.cursorX - CURSOR_OFFSETX, cgs.cursorY - CURSOR_OFFSETY, 32, 32, cgs.media.cursor);
-		CG_DrawPic( cgDC.cursorx, cgDC.cursory, 32, 32, cgs.media.cursorIcon );
+		CG_DrawPic( cgs.cursorX, cgs.cursorY, 32, 32, cgs.media.cursorIcon );	// CHRUKER: b0xx
 	}
 
 	if(fCleanup) {
Index: cgame/cgame.vcproj
===================================================================
--- cgame/cgame.vcproj	(revision 75)
+++ cgame/cgame.vcproj	(working copy)
@@ -142,7 +142,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;CGAMEDLL"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;MV_SUPPORT;CGAMEDLL"
 				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				PrecompiledHeaderFile=".\Debug/cgame.pch"
Index: game/game.vcproj
===================================================================
--- game/game.vcproj	(revision 75)
+++ game/game.vcproj	(working copy)
@@ -45,7 +45,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;BUILDING_REF_GL;DEBUG;_CRT_SECURE_NO_DEPRECATE;GAMEDLL"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;BUILDING_REF_GL;DEBUG;_CRT_SECURE_NO_DEPRECATE;MV_SUPPORT;GAMEDLL"
 				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				PrecompiledHeaderFile=".\Debug/game.pch"

The following bugs has been observed:

  • When following 1 mvclient and disabling mv. All white text is now the color of the class (ex. blue).
  • Mortar view get the wrong coordinates and movement range (yellow markers).
  • Tank riders gets the HOM effect when they are visible in the main mv view.

(kamikazee) #2

I think that Bani got this working in ETPro, no?


(Chruker) #3

yeah, they did.

I also think that many of the vital bugfixes to get it working again came with the 2.60 patch.


(jaybird) #4

I had been tinkering with this for a while. I’ll see if I can help out with this.


(Chruker) #5

Man, multiview testing just got a bit easier when you get the addbot command working :slight_smile:

Does your mod have bots/zombies/dummies? If not, but it has the bot updates from my bugfix list, you should be able to uncomment the addbot command. Just remember set bot_enable 1 before starting the map.


(jaybird) #6

Omni-bot is integrated into Jaymod, so no prob.


(jaybird) #7

I was playing with this tonight. It works quite well already. It could use a lot of cleaning up, but it is functional.

The only real problem I saw with it was there is a glitch in the in all of the spawned windows. It’s like a vertical bar on the right side of the individual windows that seem to be transparent all the way back through to the full window.

Perhaps Bani/Zinx have some insight?

I think the biggest amount of cleanup needed is in the display of players on the right side of the screen. It will currently flow right off the bottom on a large server. Perhaps a maximum amount of players, sorted by XP or rate of gain of XP?


(forty) #8

Not that this is any real help but I believe the key catcher for Multiview is missing/incomplete.


(jaybird) #9

All of the controls are present and working, though it is not quite consistent with the way the rest of the keycatching works. This would also be a good thing to rewrite, but it is not necessary.


(klines) #10

i’m trying to get multiview in my mod, working pretty well, except when the player is in the tank. if the player is in the tank and i am watching the player in a “secondary” window, then its fine, but if the person is in the “main” window (background window) then it doesnt work. i know i shouldn’t say “it doesnt work”, but i cant think of any way to describe it. its like going off the map.

does anyone have any suggestions as to what causes this and how to fix it?


(bani) #11

keycatcher basically had to be rewritten to get MV working well in etpro.