[Scummvm-git-logs] scummvm master -> 96c4fe3648d754a5e631ed89b179ddd245c1e1f9

AndywinXp noreply at scummvm.org
Thu Oct 5 07:23:30 UTC 2023


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:
96c4fe3648 SWORD1: Remove hack from fnEnterSection()


Commit: 96c4fe3648d754a5e631ed89b179ddd245c1e1f9
    https://github.com/scummvm/scummvm/commit/96c4fe3648d754a5e631ed89b179ddd245c1e1f9
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-10-05T09:23:23+02:00

Commit Message:
SWORD1: Remove hack from fnEnterSection()

This originally fixed a crash at startup, but we seem
to handle everything correctly now, so this now works
as it should. Tested on DOS, Mac and PSX versions.

Changed paths:
    engines/sword1/logic.cpp


diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index 176d6094621..ef14824efec 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -1407,10 +1407,7 @@ int Logic::fnEnterSection(Object *cpt, int32 id, int32 screen, int32 d, int32 e,
 	if (screen >= TOTAL_SECTIONS)
 		error("mega %d tried entering section %d", id, screen);
 
-	/* if (cpt->o_type == TYPE_PLAYER)
-	   ^= this was the original condition from the game sourcecode.
-	   not sure why it doesn't work*/
-	if (id == PLAYER)
+	if (cpt->o_type == TYPE_PLAYER)
 		_scriptVars[NEW_SCREEN] = screen;
 	else
 		cpt->o_screen = screen; // move the mega




More information about the Scummvm-git-logs mailing list