Skip to content

Commit

Permalink
Replace remaining references of Pi::GetGalaxy by Pi::game->GetGalaxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
lwho committed Sep 26, 2014
1 parent 7d2ea29 commit c8e1202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/LuaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<StarSystem> sys = Pi::GetGalaxy()->GetStarSystem(path);
RefCountedPtr<StarSystem> 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());
Expand Down
3 changes: 2 additions & 1 deletion src/LuaSystemBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "Pi.h"
#include "galaxy/Galaxy.h"
#include "galaxy/StarSystem.h"
#include "Game.h"

/*
* Class: SystemBody
Expand Down Expand Up @@ -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<StarSystem> s = Pi::GetGalaxy()->GetStarSystem(sbody->GetPath());
RefCountedPtr<StarSystem> s = Pi::game->GetGalaxy()->GetStarSystem(sbody->GetPath());
SystemBody *live_sbody = s->GetBodyByPath(sbody->GetPath());

if (!live_sbody->GetParent())
Expand Down

0 comments on commit c8e1202

Please sign in to comment.