diff options
author | Peter Kohaut | 2016-10-04 02:21:08 +0200 |
---|---|---|
committer | Peter Kohaut | 2016-10-04 18:15:57 +0200 |
commit | 6547c35e15252fd24f260ebd6b8f01d9edd01aa2 (patch) | |
tree | 89fec132f3325fed022c4f7bd7fd003942604352 /engines/bladerunner/set.cpp | |
parent | 281c19ab036f387a99192594aa645e696009f40b (diff) | |
download | scummvm-rg350-6547c35e15252fd24f260ebd6b8f01d9edd01aa2.tar.gz scummvm-rg350-6547c35e15252fd24f260ebd6b8f01d9edd01aa2.tar.bz2 scummvm-rg350-6547c35e15252fd24f260ebd6b8f01d9edd01aa2.zip |
BLADERUNNER: trying to figure out walking, added structures for obstacles used for pathfinding, fixed bug in searching for walkboxes
Diffstat (limited to 'engines/bladerunner/set.cpp')
-rw-r--r-- | engines/bladerunner/set.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp index 12db84ae24..f8a480c181 100644 --- a/engines/bladerunner/set.cpp +++ b/engines/bladerunner/set.cpp @@ -91,10 +91,10 @@ bool Set::open(const Common::String &name) { assert(_walkboxCount <= 95); for (int i = 0; i < _walkboxCount; ++i) { - float x, y, z; + float x, z; s->read(_walkboxes[i]._name, 20); - y = s->readFloatLE(); + _walkboxes[i]._altitude = s->readFloatLE(); _walkboxes[i]._vertexCount = s->readUint32LE(); assert(_walkboxes[i]._vertexCount <= 8); @@ -103,7 +103,7 @@ bool Set::open(const Common::String &name) { x = s->readFloatLE(); z = s->readFloatLE(); - _walkboxes[i]._vertices[j] = Vector3(x, y, z); + _walkboxes[i]._vertices[j] = Vector3(x, _walkboxes[i]._altitude, z); } // debug("WALKBOX: %s", _walkboxes[i]._name); @@ -166,7 +166,8 @@ static bool isXZInWalkbox(float x, float z, const Walkbox &walkbox) { if (x < lineX) found++; } - + lastX = currentX; + lastZ = currentZ; } return found & 1; } |