[Scummvm-git-logs] scummvm master -> 4708ec9217d94d2eda6aaac909f16ca63ca928ac
Strangerke
noreply at scummvm.org
Wed Jan 15 07:07:13 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:
4708ec9217 GOT: Fix another PVS-Studio issues (V547) in boss1
Commit: 4708ec9217d94d2eda6aaac909f16ca63ca928ac
https://github.com/scummvm/scummvm/commit/4708ec9217d94d2eda6aaac909f16ca63ca928ac
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-15T08:07:07+01:00
Commit Message:
GOT: Fix another PVS-Studio issues (V547) in boss1
Changed paths:
engines/got/game/boss1.cpp
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index af80ea4406e..3a5d249cbdd 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -45,6 +45,7 @@ int boss1_movement(ACTOR *actr) {
actr->edge_counter--;
goto done;
}
+
x1 = actr->x;
y1 = actr->y;
@@ -52,6 +53,7 @@ int boss1_movement(ACTOR *actr) {
_G(thor)->x, _G(thor)->y + 8, _G(thor)->x + 15, _G(thor)->y + 15)) {
thor_damaged(actr);
}
+
if (actr->temp3) { //start striking
actr->temp3--;
if (!actr->temp3)
@@ -84,6 +86,7 @@ int boss1_movement(ACTOR *actr) {
actr->num_moves = _G(setup).skill + 2;
goto done1;
}
+
if (actr->temp2) { // Retreating
if (actr->x < 256) {
d = 3;
@@ -98,13 +101,13 @@ int boss1_movement(ACTOR *actr) {
actr->temp2 = 0;
}
- if (ABS((_G(thor_y1)) - (actr->y + 20)) < 8) {
- if (!actr->temp1 && actr->x > _G(thor_x1)) {
- actr->temp3 = 75;
- actr->temp1 = 130;
- actr->temp2 = 0;
- }
+
+ if (actr->x > _G(thor_x1) && ABS((_G(thor_y1)) - (actr->y + 20)) < 8) {
+ actr->temp3 = 75;
+ actr->temp1 = 130;
+ actr->temp2 = 0;
}
+
f = 0;
if (actr->counter) {
actr->counter--;
More information about the Scummvm-git-logs
mailing list