[Scummvm-git-logs] scummvm master -> 0c82035515cbd9e83b2e88f44554c4898fb5e00f
alxpnv
noreply at scummvm.org
Wed Dec 8 08:32:28 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:
0c82035515 ASYLUM: fix unsigned wrap around
Commit: 0c82035515cbd9e83b2e88f44554c4898fb5e00f
https://github.com/scummvm/scummvm/commit/0c82035515cbd9e83b2e88f44554c4898fb5e00f
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-12-08T11:36:18+03:00
Commit Message:
ASYLUM: fix unsigned wrap around
Changed paths:
engines/asylum/resources/actor.cpp
diff --git a/engines/asylum/resources/actor.cpp b/engines/asylum/resources/actor.cpp
index f7b2a7ac73..397ec765e7 100644
--- a/engines/asylum/resources/actor.cpp
+++ b/engines/asylum/resources/actor.cpp
@@ -479,7 +479,7 @@ void Actor::update() {
case kActorStatusDisabled:
_frameIndex = (_frameIndex + 1) % _frameCount;
- if (_vm->screenUpdateCount - _lastScreenUpdate > 300) {
+ if (_vm->screenUpdateCount > _lastScreenUpdate + 300) {
if (_vm->getRandom(100) < 50) {
if (!getSpeech()->getSoundResourceId() || !getSound()->isPlaying(getSpeech()->getSoundResourceId())) {
if (canChangeStatus(10))
@@ -2100,7 +2100,7 @@ void Actor::updateStatusEnabled() {
_frameIndex = (_frameIndex + 1) % _frameCount;
- if (_vm->screenUpdateCount - _lastScreenUpdate > 300) {
+ if (_vm->screenUpdateCount > _lastScreenUpdate + 300) {
// All actors except Crow and Armed Max
if (strcmp((char *)&_name, "Crow") && strcmp((char *)_name, "Armed Max")) {
if (_vm->getRandom(100) < 50
@@ -2114,7 +2114,7 @@ void Actor::updateStatusEnabled() {
// Actor: Player
if (_index == getSharedData()->getPlayerIndex()) {
- if (_vm->lastScreenUpdate && (_vm->screenUpdateCount - _vm->lastScreenUpdate) > 500) {
+ if (_vm->lastScreenUpdate && (_vm->screenUpdateCount > _vm->lastScreenUpdate + 500)) {
if (_vm->isGameFlagNotSet(kGameFlagScriptProcessing)
&& isVisible()
More information about the Scummvm-git-logs
mailing list