Changing the limbo menu


(*Shadow* Commando) #1

I’m trying to change the limbo menu.
I want to take out the command map, and all other buttons on the left side.
I did this, but when I now load limbo it draws a black screen where the command map
and the buttons used to be.
My question is: How can I prevent it from drawing a black screen.
The goal is I want a pop-up limbo menu, just like for example the quickchat menu.
So you can see the game aswell as the limbo menu.

Thanks


(IneQuation) #2

I guess you’ll have to do so by code.


(*Shadow* Commando) #3

I know that, but the question is how. I looked around in cg_limbopanel.c but couldn’t find it there,
is suppose it has something to do with either cg.showgameview or CGAME_EVENT_GAMEVIEW
But I just can’t find out what makes the black screen


(Jaquboss) #4

something like this

	if ( cg.showGameView ) {
 		float x, y, w, h;
 		x = LIMBO_3D_X;
 		y = LIMBO_3D_Y;
 		w = LIMBO_3D_W;
 		h = LIMBO_3D_H;

 		CG_AdjustFrom640( &x, &y, &w, &h );

 		cg.refdef_current->x = x;
 		cg.refdef_current->y = y;
 		cg.refdef_current->width = w;
 		cg.refdef_current->height = h;

 		CG_Letterbox( (LIMBO_3D_W/640.f)*100, (LIMBO_3D_H/480.f)*100, qfalse );
	}

, you want probably to do TCE limbo , right?
check all cg.showGameView thingies


(*Shadow* Commando) #5

Found the same yesterday jaquboss.
But besides that you need to change some more, because you would get a really weird
picture on the left of the screen.
This is what I did, it looks a bit weird, but it works:

In cg_draw.c:

/*
	if ( cg.showGameView ) {
 		float x, y, w, h;
 		x = LIMBO_3D_X;
 		y = LIMBO_3D_Y;
 		w = LIMBO_3D_W;
 		h = LIMBO_3D_H;

 		CG_AdjustFrom640( &x, &y, &w, &h );

 		cg.refdef_current->x = x;
 		cg.refdef_current->y = y;
 		cg.refdef_current->width = w;
 		cg.refdef_current->height = h;

 		CG_Letterbox( (LIMBO_3D_W/640.f)*100, (LIMBO_3D_H/480.f)*100, qfalse );
	}
*/

In cg_view.c in cg_calcvrect did the same.
Leave :

CG_Letterbox( 100, 100, qtrue );

In, cause else you will end up with a black screen.

Some further down in cg_view.c:

/*if( cg.showGameView ) {
		VectorCopy( cgs.ccPortalPos, cg.refdef_current->vieworg );
		if( cg.showGameView && cgs.ccPortalEnt != -1 ) {
			vec3_t vec;
			VectorSubtract( cg_entities[cgs.ccPortalEnt].lerpOrigin, cg.refdef_current->vieworg, vec );
			vectoangles( vec, cg.refdefViewAngles );
		} else {
			VectorCopy( cgs.ccPortalAngles, cg.refdefViewAngles );	
		}		
	} else*/
	if( cg.renderingThirdPerson && (ps->eFlags & EF_MG42_ACTIVE || ps->eFlags & EF_AAGUN_ACTIVE )) { // Arnout: see if we're attached to a gun

And finally change this:

if( !cg.showGameView || cg.showGameView ) {
		// add error decay

When you enter the limbo panel now, you will have a thirdperson view of you player, and you see all happening realtime.

Thanks jaquboss for the reply.


(IneQuation) #6
if( !cg.showGameView || cg.showGameView )

This just made my day! :rofl: How do you think, would this make it to bash.org? :smiley:


(*Shadow* Commando) #7

You can also just remove the whole line, but I did this to test it.
But I know it’s pretty useless. :wink: