[Scummvm-git-logs] scummvm master -> 570689dc2a30bdffa930002699621d7bec9150e1
Strangerke
noreply at scummvm.org
Wed Jan 15 06:57:51 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:
570689dc2a GOT: Fix 2 PVS-Studio issues (V1037)
Commit: 570689dc2a30bdffa930002699621d7bec9150e1
https://github.com/scummvm/scummvm/commit/570689dc2a30bdffa930002699621d7bec9150e1
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-15T07:57:41+01:00
Commit Message:
GOT: Fix 2 PVS-Studio issues (V1037)
Changed paths:
engines/got/game/boss1.cpp
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 88932b91f51..af80ea4406e 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -94,16 +94,15 @@ int boss1_movement(ACTOR *actr) {
}
actr->num_moves = _G(setup).skill + 1;
goto done0;
- } else
- actr->temp2 = 0;
+ }
+
+ actr->temp2 = 0;
}
if (ABS((_G(thor_y1)) - (actr->y + 20)) < 8) {
- if (!actr->temp1) {
- if (actr->x > _G(thor_x1)) {
- actr->temp3 = 75;
- actr->temp1 = 130;
- actr->temp2 = 0;
- }
+ if (!actr->temp1 && actr->x > _G(thor_x1)) {
+ actr->temp3 = 75;
+ actr->temp1 = 130;
+ actr->temp2 = 0;
}
}
f = 0;
@@ -111,6 +110,7 @@ int boss1_movement(ACTOR *actr) {
actr->counter--;
switch (d) {
case 1:
+ case 3:
x1 = _G(actor[5]).x;
y1 = _G(actor[5]).y;
y1 += 2;
@@ -123,26 +123,14 @@ int boss1_movement(ACTOR *actr) {
}
break;
case 0:
- y1 -= 2;
- if (!check_move2(x1, y1, actr))
- f = 1;
- break;
- case 3:
- x1 = _G(actor[5]).x;
- y1 = _G(actor[5]).y;
- y1 += 2;
- if (!check_move2(x1, y1, &_G(actor[5])))
- f = 1;
- else {
- actr->x = _G(actor[5]).x;
- actr->y = _G(actor[5]).y - 16;
- }
- break;
case 2:
y1 -= 2;
if (!check_move2(x1, y1, actr))
f = 1;
break;
+
+ default:
+ break;
}
} else
f = 1;
More information about the Scummvm-git-logs
mailing list