Changing the default camera mode

Changing the default camera mode

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Changing the default camera mode

Post by colorblind »

I know, I have too much spare time. But if you want to change the default camera mode to the overview, change the lines 89/90 in MouseHandler.cpp

Code: Select all

	currentCamController=camControllers[0];
	currentCamControllerNum=0;
to

Code: Select all

	currentCamController=camControllers[1];
	currentCamControllerNum=1;
You can also use the value 2 if you're more of a Total War style fan. This works, but as an aside I'd like to know why the lines 232-233 in GameSetup.cpp

Code: Select all

	mouse->currentCamController=mouse->camControllers[1];
			mouse->currentCamControllerNum=1;
don't do this already.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

It does, for me at least.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Not for me they don't. Strange ...
How does the new implementation work then? I'm guessing that when you're waiting for other players to connect, you're in the mode set by MouseHandler.cpp, and at the start of the game the 'if(allReady)' handler in GameSetup.cpp (line 230) changes it.
But why doesn't this work for me? Could it be a compilation error?
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Yes its supposed to work like that, no idea why it wouldnt for you.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

I think I know the answer: the 'if(allReady)' handler in GameSetup.cpp isn't invoked when you use one of the scripts to begin a game (right?). When I started a game through the SpringClient the camera was in TA mode and neatly centered at the commander, so the handle does work for me when it is called.
Post Reply

Return to “Engine”