[Scummvm-git-logs] scummvm master -> 0dbc280f1ce43687d77c3dff809b6ea6f48030bf
alxpnv
a04198622 at gmail.com
Wed Jun 2 11:45:16 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0dbc280f1c ASYLUM: add vertex check to Polygon::contains()
Commit: 0dbc280f1ce43687d77c3dff809b6ea6f48030bf
https://github.com/scummvm/scummvm/commit/0dbc280f1ce43687d77c3dff809b6ea6f48030bf
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-06-02T14:45:04+03:00
Commit Message:
ASYLUM: add vertex check to Polygon::contains()
This resolves an issue with auto-walking to a towel in Chapter 1
Changed paths:
engines/asylum/resources/polygons.cpp
diff --git a/engines/asylum/resources/polygons.cpp b/engines/asylum/resources/polygons.cpp
index bc334a905b..45a8a22f82 100644
--- a/engines/asylum/resources/polygons.cpp
+++ b/engines/asylum/resources/polygons.cpp
@@ -43,6 +43,9 @@ bool Polygon::contains(const Common::Point &point) {
yflag0 = (vtx0->y > point.y);
for (uint32 pt = 0; pt < count(); pt++, vtx1++) {
+ if (point == *vtx1)
+ return true;
+
yflag1 = (vtx1->y > point.y);
if (yflag0 != yflag1) {
if (((vtx1->y - point.y) * (vtx0->x - vtx1->x) > (vtx1->x - point.x) * (vtx0->y - vtx1->y)) == yflag1) {
More information about the Scummvm-git-logs
mailing list