Disabling Spectator modes Created 6 years ago2018-11-25 11:53:08 UTC by abbadon abbadon

Created 6 years ago2018-11-25 11:53:08 UTC by abbadon abbadon

Posted 6 years ago2018-11-25 11:53:08 UTC Post #341314
HI again, I was trying to deactivate or disabling several of the known spectator modes. I have tried it commenting those options in spectcammenu.txt, with no luck, because when you press JUMP while you are in spectator mode, those modes are still present. I have also looked into the observer.cpp code, but I don´t have any clear what should I do. I have commented

`
// Changing to Chase Lock?
if ( iMode == OBS_CHASE_LOCKED )
{
	// If changing from Roaming, or starting observing, make sure there is a target
	if ( m_hObserverTarget == NULL )
		Observer_FindNextPlayer( false );
	if (m_hObserverTarget)
	{
		pev->iuser1 = OBS_CHASE_LOCKED;
		pev->iuser2 = ENTINDEX( m_hObserverTarget->edict() );
		ClientPrint( pev, HUD_PRINTCENTER, "Free Roaming" );
		pev->maxspeed = 0;
	}
	else
	{
		ClientPrint( pev, HUD_PRINTCENTER, "No Target"  );
		Observer_SetMode(OBS_ROAMING);
	}
	return;
}`
Just to find htat you have no visible model but you can walk and interact in the game, and all other spectator options were gone... :(

How can I disable all spectator modes except free chasecam and locled chasecam?
Posted 6 years ago2018-11-25 12:10:11 UTC Post #341315
Looks to me like you should put that code back in and focus on Observer_HandleButtons
Posted 6 years ago2018-11-25 13:07:46 UTC Post #341317
Tried... but I obtain the two modes I want and two others that consist in me freezed showing all from a fixed camera position :/
Posted 6 years ago2018-11-25 14:37:44 UTC Post #341318
Like potatis_invalid said, you need to focus on Observer_HandleButtons. Remove the if statements that handle the modes you want to disable and make sure the other ones don't try to set those modes.
Posted 6 years ago2018-11-25 15:18:54 UTC Post #341321
Ok. :) I´ll post the results. ;)

Edit: tried!!, but remember, if I was as good in coding as I am in modelling I will be the next Jon Skeet... I have made the modifications, and one time I finished seeing the whole map in 3D as if it was the minimap!!, I mean, the minimap on the left and in the center of the screen I could see the map in 3D moving in coordination with the 2D minimap, weird!!. I decided to not fiddle it more than it was and left things as default. :walter:
You must be logged in to post a response.