From c8e12028ee054f4d1c6bd8dbf239367325263920 Mon Sep 17 00:00:00 2001 From: "Lars W. (lwho)" Date: Sat, 20 Sep 2014 20:09:35 +0200 Subject: [PATCH] Replace remaining references of Pi::GetGalaxy by Pi::game->GetGalaxy. --- src/LuaPlayer.cpp | 2 +- src/LuaSystemBody.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LuaPlayer.cpp b/src/LuaPlayer.cpp index f42fcf3c5d2..c2c2694563e 100644 --- a/src/LuaPlayer.cpp +++ b/src/LuaPlayer.cpp @@ -255,7 +255,7 @@ static int l_set_hyperspace_target(lua_State *l) if (!path.IsBodyPath()) { return luaL_error(l, "Player:SetHyperspaceTarget() -- second parameter is not a system path or the path of a star"); } - RefCountedPtr sys = Pi::GetGalaxy()->GetStarSystem(path); + RefCountedPtr sys = Pi::game->GetGalaxy()->GetStarSystem(path); // Lua should never be able to get an invalid SystemPath // (note: this may change if it becomes possible to remove systems during the game) assert(path.bodyIndex < sys->GetNumBodies()); diff --git a/src/LuaSystemBody.cpp b/src/LuaSystemBody.cpp index 85e871197fb..f799d4ec8ce 100644 --- a/src/LuaSystemBody.cpp +++ b/src/LuaSystemBody.cpp @@ -7,6 +7,7 @@ #include "Pi.h" #include "galaxy/Galaxy.h" #include "galaxy/StarSystem.h" +#include "Game.h" /* * Class: SystemBody @@ -145,7 +146,7 @@ static int l_sbody_attr_parent(lua_State *l) // sbody->parent is 0 as it was cleared by the acquirer. we need to go // back to the starsystem proper to get what we need. - RefCountedPtr s = Pi::GetGalaxy()->GetStarSystem(sbody->GetPath()); + RefCountedPtr s = Pi::game->GetGalaxy()->GetStarSystem(sbody->GetPath()); SystemBody *live_sbody = s->GetBodyByPath(sbody->GetPath()); if (!live_sbody->GetParent())