[Scummvm-git-logs] scummvm master -> e2e3ec2dd510725a22962e0101777323666e3dbe

alxpnv noreply at scummvm.org
Wed Nov 2 10:53:16 UTC 2022


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:
e2e3ec2dd5 ASYLUM: fix showing Sarah's reflection in Chapter 4b


Commit: e2e3ec2dd510725a22962e0101777323666e3dbe
    https://github.com/scummvm/scummvm/commit/e2e3ec2dd510725a22962e0101777323666e3dbe
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-11-02T13:57:01+03:00

Commit Message:
ASYLUM: fix showing Sarah's reflection in Chapter 4b

Changed paths:
    engines/asylum/resources/actor.cpp


diff --git a/engines/asylum/resources/actor.cpp b/engines/asylum/resources/actor.cpp
index 4d4af918180..8115186c8bc 100644
--- a/engines/asylum/resources/actor.cpp
+++ b/engines/asylum/resources/actor.cpp
@@ -787,7 +787,7 @@ void Actor::updateReflectionData() {
 	if (_nextActionIndex != -1 && !getScene()->polygons()->get(getWorld()->actions[_nextActionIndex]->polygonIndex).contains(sum))
 		return;
 
-	ActorDirection direction = kDirectionN;
+	ActorDirection direction = _direction;
 	Common::Point position = sum;
 	ResourceId resourceId;
 	switch (_nextDirection) {
@@ -1455,13 +1455,12 @@ void Actor::setupReflectionData(ActorIndex nextActor, int32 actionAreaId, ActorD
 		if (nextPositionOffset.x) {
 			offset = nextPositionOffset;
 		} else {
-			Polygon polygon = getScene()->polygons()->get((uint32)_nextActionIndex);
+			Polygon polygon = getScene()->polygons()->get((uint32)_nextActionIndex + 1);
 
 			offset = polygon.points[0];
-
 			// Iterate through points
 			if (polygon.count() > 1) {
-				for (uint i = 1; i < polygon.count() - 1; i++) {
+				for (uint i = 1; i < polygon.count(); i++) {
 					Common::Point point = polygon.points[i];
 
 					switch (nextDirection) {




More information about the Scummvm-git-logs mailing list