diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-11-05 09:20:33 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-11-05 09:20:33 -0500 |
commit | 763c18abe97ccaaf977cb4d09d53ef3b230100d7 (patch) | |
tree | 7e770556e66203e8eecd0ab2e79d996864581784 /src | |
parent | b934c2d6ad99b2dc183c11e8cbb2ecc3fe375700 (diff) |
indoor ortho fix
Diffstat (limited to 'src')
-rw-r--r-- | src/world.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp index 5e7fb41..77872c1 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -22,6 +22,8 @@ extern std::vector<Entity *> entity; extern std::vector<Structures *> build; +bool worldInside = false; + float worldGetYBase(World *w){ float base = 0; World *ptr = w; @@ -543,11 +545,13 @@ World *World::goInsideStructure(Player *p){ if(build[i]->inWorld==this){ if(p->loc.x > build[i]->loc.x && p->loc.x + p->width < build[i]->loc.x + build[i]->width){ + worldInside = true; return (World *)build[i]->inside; } }else if(build[i]->inside==this){ p->loc.x=build[i]->loc.x + build[i]->width / 2 - p->width / 2; p->loc.y=build[i]->loc.y + HLINE; + worldInside = false; return (World *)build[i]->inWorld; } } |