diff options
-rw-r--r-- | engines/cge2/hero.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/vga13h.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 1ddf870214..5e075d8fa2 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -542,7 +542,7 @@ int CGE2Engine::mapCross(const V2D &a, const V2D &b) { if (cross(a, b, *n0, *n)) ++cnt; - if (n == p) + if (*n == *p) p = nullptr; } else { p = n; diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index a6e12fe8a1..948c3ab9b3 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -148,6 +148,7 @@ public: V2D operator-(const V2D &p) const { return V2D(_vm, x - p.x, y - p.y); } bool operator==(const V3D &p) const { V3D tmp(x, y); return tmp._x == p._x && tmp._y == p._y && tmp._z == p._z; } bool operator!=(const V3D &p) const { V3D tmp(x, y); return tmp._x != p._x || tmp._y != p._y || tmp._z == p._z; } + bool operator==(const V2D &p) const { return x == p.x && y == p.y; } uint16 area() { return x * y; } bool limited(const V2D &p) { return ((x < p.x) && (y < p.y)); |