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

sev- noreply at scummvm.org
Sat Aug 24 20:21:46 UTC 2024


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:
b51394bac9 QDENGINE: Restored the code which was errorneously deleted


Commit: b51394bac9adb993a34625eddaace26fd86eeb3a
    https://github.com/scummvm/scummvm/commit/b51394bac9adb993a34625eddaace26fd86eeb3a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-08-24T22:19:19+02:00

Commit Message:
QDENGINE: Restored the code which was errorneously deleted

The original here clearly has a bug. The code was:

                st = last_walk_state_;
                if(!st || st -> state_type() != qdGameObjectState::STATE_WALK)
                        st = get_default_state();
else
                st = get_default_state();
                if(!st) st = get_state(0);

Note indentation of 'else', which clearly shoud be a preprocessor's #else.

Changed paths:
    engines/qdengine/qdcore/qd_game_object_moving.cpp


diff --git a/engines/qdengine/qdcore/qd_game_object_moving.cpp b/engines/qdengine/qdcore/qd_game_object_moving.cpp
index f774f9865d4..f68d33a3355 100644
--- a/engines/qdengine/qdcore/qd_game_object_moving.cpp
+++ b/engines/qdengine/qdcore/qd_game_object_moving.cpp
@@ -2618,8 +2618,8 @@ const qdGameObjectStateWalk *qdGameObjectMoving::current_walk_state() const {
 	const qdGameObjectState *st = get_cur_state();
 	if (!st || st->state_type() != qdGameObjectState::STATE_WALK) {
 		st = _last_walk_state;
-		st = get_default_state();
-		if (!st) st = get_state(0);
+		if (!st || st->state_type() != qdGameObjectState::STATE_WALK)
+			st = get_default_state();
 	}
 
 	if (st && st->state_type() == qdGameObjectState::STATE_WALK)




More information about the Scummvm-git-logs mailing list