Skip to content

Commit

Permalink
game: Always have a camera
Browse files Browse the repository at this point in the history
  • Loading branch information
bwrsandman committed May 4, 2024
1 parent 9efdb35 commit 5763a40
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Game* Game::sInstance = nullptr;

Game::Game(Arguments&& args)
: _gamePath(args.gamePath)
, _camera(std::make_unique<Camera>(glm::zero<glm::vec3>()))
, _eventManager(std::make_unique<EventManager>())
, _startMap(args.startLevel)
, _handPose(glm::identity<glm::mat4>())
Expand Down Expand Up @@ -886,7 +887,6 @@ void Game::LoadMap(const std::filesystem::path& path)

// create our camera
const auto aspect = Locator::windowing::has_value() ? Locator::windowing::value().GetAspectRatio() : 1.0f;
_camera = std::make_unique<Camera>(glm::zero<glm::vec3>());
(*_camera)
.SetProjectionMatrixPerspective(_config.cameraXFov, aspect, _config.cameraNearClip, _config.cameraFarClip)
.SetOrigin(glm::vec3(1441.56f, 24.764f, 2081.76f))
Expand Down
2 changes: 1 addition & 1 deletion test/mobile_wall_hug/scenarios/mobilewallhug1.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION(2.300000)
SET_LAND_NUMBER(0)
LOAD_LANDSCAPE(".\DATA\LANDSCAPE\MULTI_PLAYER\MPM_2P_1.lnd")
rem START_CAMERA_POS("2197.83,2372.96")
START_CAMERA_POS("2197.83,2372.96")

SET_TOWN_INFLUENCE_MULTIPLIER(0.40000)
SET_PLAYER_INFLUENCE_MULTIPLIER(10.000000)
Expand Down
2 changes: 1 addition & 1 deletion test/mobile_wall_hug/scenarios/mobilewallhug2.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION(2.300000)
SET_LAND_NUMBER(0)
LOAD_LANDSCAPE(".\DATA\LANDSCAPE\MULTI_PLAYER\MPM_2P_1.lnd")
rem START_CAMERA_POS("2197.83,2372.96")
START_CAMERA_POS("2197.83,2372.96")

SET_TOWN_INFLUENCE_MULTIPLIER(0.40000)
SET_PLAYER_INFLUENCE_MULTIPLIER(10.000000)
Expand Down
2 changes: 1 addition & 1 deletion test/mobile_wall_hug/scenarios/mobilewallhug_footpath1.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION(2.300000)
SET_LAND_NUMBER(0)
LOAD_LANDSCAPE(".\DATA\LANDSCAPE\MULTI_PLAYER\MPM_2P_1.lnd")
rem START_CAMERA_POS("2197.83,2372.96")
START_CAMERA_POS("2197.83,2372.96")

SET_TOWN_INFLUENCE_MULTIPLIER(0.40000)
SET_PLAYER_INFLUENCE_MULTIPLIER(10.000000)
Expand Down
2 changes: 1 addition & 1 deletion test/mobile_wall_hug/scenarios/mobilewallhug_footpath2.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION(2.300000)
SET_LAND_NUMBER(0)
LOAD_LANDSCAPE(".\DATA\LANDSCAPE\MULTI_PLAYER\MPM_2P_1.lnd")
rem START_CAMERA_POS("2197.83,2372.96")
START_CAMERA_POS("2197.83,2372.96")

SET_TOWN_INFLUENCE_MULTIPLIER(0.40000)
SET_PLAYER_INFLUENCE_MULTIPLIER(10.000000)
Expand Down

0 comments on commit 5763a40

Please sign in to comment.