Skip to content

Commit d092cdb

Browse files
committed
refactor(logic): Remove double initialization of camera zoom and angles
1 parent 6418de5 commit d092cdb

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,9 +2082,6 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
20822082
// update the loadscreen
20832083
updateLoadProgress(LOAD_PROGRESS_POST_PRELOAD_ASSETS);
20842084

2085-
TheTacticalView->setAngleAndPitchToDefault();
2086-
TheTacticalView->setZoomToDefault();
2087-
20882085
if( TheRecorder )
20892086
TheRecorder->initControls();
20902087

@@ -2108,6 +2105,11 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
21082105
// update the loadscreen
21092106
updateLoadProgress(LOAD_PROGRESS_POST_STARTING_CAMERA);
21102107

2108+
// Set up the camera height based on the map height & globalData.
2109+
TheTacticalView->initHeightForMap();
2110+
TheTacticalView->setAngleAndPitchToDefault();
2111+
TheTacticalView->setZoomToDefault();
2112+
21112113
Waypoint *way = findNamedWaypoint(startingCamName);
21122114
if (way)
21132115
{
@@ -2126,11 +2128,6 @@ void GameLogic::startNewGame( Bool loadingSaveGame )
21262128
DEBUG_LOG(("Failed to find initial camera position waypoint %s", startingCamName.str()));
21272129
}
21282130

2129-
// Set up the camera height based on the map height & globalData.
2130-
TheTacticalView->initHeightForMap();
2131-
TheTacticalView->setAngleAndPitchToDefault();
2132-
TheTacticalView->setZoomToDefault();
2133-
21342131
// update the loadscreen
21352132
updateLoadProgress(LOAD_PROGRESS_POST_STARTING_CAMERA_2);
21362133

0 commit comments

Comments
 (0)