[Scummvm-git-logs] scummvm branch-2-3 -> 867e7d400c8b88efc4ff15a7bc4bc084f5ae5e9a

mgerhardy martin.gerhardy at gmail.com
Thu Sep 9 05:13:15 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:
867e7d400c TWINE: godmode is only for attacking the hero now


Commit: 867e7d400c8b88efc4ff15a7bc4bc084f5ae5e9a
    https://github.com/scummvm/scummvm/commit/867e7d400c8b88efc4ff15a7bc4bc084f5ae5e9a
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-09-09T07:12:45+02:00

Commit Message:
TWINE: godmode is only for attacking the hero now

Changed paths:
    engines/twine/scene/animations.cpp
    engines/twine/scene/collision.cpp
    engines/twine/script/script_life_v1.cpp


diff --git a/engines/twine/scene/animations.cpp b/engines/twine/scene/animations.cpp
index 1aed4f5c2c..521510f03e 100644
--- a/engines/twine/scene/animations.cpp
+++ b/engines/twine/scene/animations.cpp
@@ -696,9 +696,7 @@ void Animations::processActorAnimations(int32 actorIdx) {
 						_engine->_movements->_heroMoved = true;
 					}
 
-					if (!_engine->_debugScene->_godMode) {
-						actor->addLife(-1);
-					}
+					actor->addLife(-1);
 				}
 			}
 		}
@@ -716,9 +714,7 @@ void Animations::processActorAnimations(int32 actorIdx) {
 						_engine->_extra->addExtraSpecial(actor->_pos.x, actor->_pos.y + 1000, actor->_pos.z, ExtraSpecialType::kHitStars);
 						initAnim(AnimationTypes::kBigHit, AnimType::kAnimationType_2, AnimationTypes::kStanding, _currentlyProcessedActorIdx);
 						_engine->_movements->_heroMoved = true;
-						if (!_engine->_debugScene->_godMode) {
-							actor->addLife(-1);
-						}
+						actor->addLife(-1);
 					}
 
 					// no Z coordinate issue
diff --git a/engines/twine/scene/collision.cpp b/engines/twine/scene/collision.cpp
index c166e9ac3a..9ec6e61c72 100644
--- a/engines/twine/scene/collision.cpp
+++ b/engines/twine/scene/collision.cpp
@@ -381,9 +381,7 @@ void Collision::stopFalling() { // ReceptionObj()
 			if (fall >= BRICK_HEIGHT * 16) {
 				_engine->_actor->_processActorPtr->setLife(0);
 			} else {
-				if (!_engine->_debugScene->_godMode) {
-					_engine->_actor->_processActorPtr->addLife(-1);
-				}
+				_engine->_actor->_processActorPtr->addLife(-1);
 			}
 			_engine->_animations->initAnim(AnimationTypes::kLandingHit, AnimType::kAnimationType_2, AnimationTypes::kStanding, _engine->_animations->_currentlyProcessedActorIdx);
 		} else if (fall > 10) {
diff --git a/engines/twine/script/script_life_v1.cpp b/engines/twine/script/script_life_v1.cpp
index c29db44ecd..de778d7fb4 100644
--- a/engines/twine/script/script_life_v1.cpp
+++ b/engines/twine/script/script_life_v1.cpp
@@ -1162,11 +1162,9 @@ static int32 lSUB_LIFE_POINT_OBJ(TwinEEngine *engine, LifeScriptContext &ctx) {
 	const int32 lifeValue = ctx.stream.readByte();
 
 	ActorStruct *otherActor = engine->_scene->getActor(otherActorIdx);
-	if (!engine->_debugScene->_godMode) {
-		otherActor->addLife(-lifeValue);
-		if (otherActor->_life < 0) {
-			otherActor->setLife(0);
-		}
+	otherActor->addLife(-lifeValue);
+	if (otherActor->_life < 0) {
+		otherActor->setLife(0);
 	}
 
 	return 0;




More information about the Scummvm-git-logs mailing list