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

mgerhardy noreply at scummvm.org
Thu Oct 24 08:56:25 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:
f75439fc63 TWINE: the W key was supposed to only do Action on Normal


Commit: f75439fc63591a04d75a66ec20ab4591d11c0af4
    https://github.com/scummvm/scummvm/commit/f75439fc63591a04d75a66ec20ab4591d11c0af4
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-10-23T22:24:51+02:00

Commit Message:
TWINE: the W key was supposed to only do Action on Normal

see #15408: https://bugs.scummvm.org/ticket/15408

Changed paths:
    engines/twine/input.cpp
    engines/twine/scene/movements.cpp
    engines/twine/scene/movements.h


diff --git a/engines/twine/input.cpp b/engines/twine/input.cpp
index 89e6a89157d..b7c5b14f999 100644
--- a/engines/twine/input.cpp
+++ b/engines/twine/input.cpp
@@ -87,7 +87,7 @@ bool Input::isMoveOrTurnActionActive() const {
 }
 
 bool Input::isHeroActionActive() const {
-	return isActionActive(TwinEActionType::ExecuteBehaviourAction) || isActionActive(TwinEActionType::SpecialAction);
+	return isActionActive(TwinEActionType::ExecuteBehaviourAction);
 }
 
 bool Input::resetHeroActions() {
diff --git a/engines/twine/scene/movements.cpp b/engines/twine/scene/movements.cpp
index ab06facccb9..cfb8412e397 100644
--- a/engines/twine/scene/movements.cpp
+++ b/engines/twine/scene/movements.cpp
@@ -242,14 +242,9 @@ void Movements::update() {
 	_changedCursorKeys.update(_engine);
 }
 
-bool Movements::processBehaviourExecution(int actorIdx) {
-	bool executeAction = false;
-	if (_engine->_input->toggleActionIfActive(TwinEActionType::SpecialAction)) {
-		executeAction = true;
-	}
+void Movements::processBehaviourExecution(int actorIdx) {
 	switch (_engine->_actor->_heroBehaviour) {
 	case HeroBehaviourType::kNormal:
-		executeAction = true;
 		break;
 	case HeroBehaviourType::kAthletic:
 		_engine->_animations->initAnim(AnimationTypes::kJump, AnimType::kAnimationThen, AnimationTypes::kStanding, actorIdx);
@@ -295,7 +290,6 @@ bool Movements::processBehaviourExecution(int actorIdx) {
 	case HeroBehaviourType::kMax:
 		break;
 	}
-	return executeAction;
 }
 
 bool Movements::processAttackExecution(int actorIdx) {
@@ -401,7 +395,9 @@ void Movements::processManualAction(int actorIdx) {
 	if (IS_HERO(actorIdx)) {
 		_actionNormal = false;
 		if (_engine->_input->isHeroActionActive()) {
-			_actionNormal = processBehaviourExecution(actorIdx);
+			processBehaviourExecution(actorIdx);
+		} else if (_engine->_input->toggleActionIfActive(TwinEActionType::SpecialAction)) {
+			_actionNormal = true;
 		}
 	}
 
diff --git a/engines/twine/scene/movements.h b/engines/twine/scene/movements.h
index 48cdf038f38..bf48fadb6e2 100644
--- a/engines/twine/scene/movements.h
+++ b/engines/twine/scene/movements.h
@@ -104,17 +104,15 @@ private:
 	 */
 	void processSameXZAction(int actorIdx);
 
-	/**
-	 * @return A value of @c true means that the actor should e.g. start reading a sign or checking
-	 * a locker for loot or secrets
-	 */
-	bool processBehaviourExecution(int actorIdx);
+	void processBehaviourExecution(int actorIdx);
 	bool processAttackExecution(int actorIdx);
 	void processManualMovementExecution(int actorIdx);
 	void processManualRotationExecution(int actorIdx);
 
 	/**
-	 * This is true if the player hits the action button. E.g. in the second prison scene when you hide in the waste.
+	 * @return A value of @c true means that the actor should e.g. start reading a sign or checking
+	 * a locker for loot or secrets or talking to an npc - this can get triggered by the SpecialAction binding
+	 * in any behaviour mode
 	 */
 	bool _actionNormal = false;
 	void manualRealAngle(ActorStruct *actor);




More information about the Scummvm-git-logs mailing list