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

Strangerke noreply at scummvm.org
Tue Jan 14 07:58:46 UTC 2025


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:
e64c0dfef8 GOT: After a check in the original sources, remove two useless checks in pick_up_object (fixes CID 1589448)


Commit: e64c0dfef898cff3976e9824d888d7e16e379133
    https://github.com/scummvm/scummvm/commit/e64c0dfef898cff3976e9824d888d7e16e379133
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-14T08:58:29+01:00

Commit Message:
GOT: After a check in the original sources, remove two useless checks in pick_up_object (fixes CID 1589448)

Changed paths:
    engines/got/game/object.cpp


diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index 69cd88abe2e..3a40e1fcc8a 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -153,7 +153,6 @@ void pick_up_object(int p) {
 		s = 1 << (_G(object_map[p]) - 27);
 		_G(thor_info).inventory |= s;
 		odin_speaks((_G(object_map[p]) - 27) + 516, _G(object_map[p]) - 1);
-		s = 1;
 		_G(thor_info).item = _G(object_map[p]) - 26;
 		add_magic(150);
 		fill_score(5);
@@ -166,18 +165,14 @@ void pick_up_object(int p) {
 	_G(oy) = y * 16;
 	_G(of) = 1;
 
-	int r = 1;
-	s = 0;
-	if (!s)
-		play_sound(YAH, false);
+	play_sound(YAH, false);
 	_G(object_map[p]) = 0;
 
-	if (r) {
-		// Reset so it doesn't reappear on reentry to screen
-		if (_G(object_index[p]) < 30)
-			_G(scrn).static_obj[_G(object_index[p])] = 0;
-		_G(object_index[p]) = 0;
-	}
+	// Reset so it doesn't reappear on reentry to screen
+	if (_G(object_index[p]) < 30)
+		_G(scrn).static_obj[_G(object_index[p])] = 0;
+	
+	_G(object_index[p]) = 0;
 }
 
 int drop_object(ACTOR *actr) {




More information about the Scummvm-git-logs mailing list