[Scummvm-git-logs] scummvm master -> 9fdaf71a5944921782fa89006dbee8985a341c4b
dreammaster
noreply at scummvm.org
Thu Jul 9 10:41:15 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
4595e4425e LURE: Don't treat the hotspot we're deliberately walking up to as an obstacle
3ce5430fb0 LURE: Avoid endless loop at a room exit when set destination is unreachable
9fdaf71a59 LURE: Don't start a conversation with a character that has none defined
Commit: 4595e4425e50ba93761925cbfce7ed7fd3b9ca0d
https://github.com/scummvm/scummvm/commit/4595e4425e50ba93761925cbfce7ed7fd3b9ca0d
Author: Max H. Gerlach (git at maxgerlach.de)
Date: 2026-07-09T20:40:06+10:00
Commit Message:
LURE: Don't treat the hotspot we're deliberately walking up to as an obstacle
Fixes #14397 https://bugs.scummvm.org/ticket/14397
Assisted-by: Claude:claude-opus-4.8
Changed paths:
engines/lure/hotspots.cpp
engines/lure/hotspots.h
engines/lure/res_struct.cpp
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index bb7ba2ed9b5..ca09a76c358 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -56,6 +56,7 @@ Hotspot::Hotspot(HotspotData *res): _pathFinder(this) {
_destX = res->startX;
_destY = res->startY;
_destHotspotId = 0;
+ _walkToHotspotId = 0;
_frameWidth = res->width;
_frameStartsUsed = false;
_height = res->height;
@@ -101,6 +102,7 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) {
_override = nullptr;
_colorOffset = 0;
_destHotspotId = character->hotspotId();
+ _walkToHotspotId = 0;
_blockedOffset = 0;
_exitCtr = 0;
_voiceCtr = 0;
@@ -172,6 +174,7 @@ Hotspot::Hotspot(): _pathFinder(nullptr) {
_override = nullptr;
_colorOffset = 0;
_destHotspotId = 0;
+ _walkToHotspotId = 0;
_blockedOffset = 0;
_exitCtr = 0;
_voiceCtr = 0;
@@ -492,6 +495,7 @@ void Hotspot::walkTo(int16 endPosX, int16 endPosY, uint16 destHotspot) {
_destX = endPosX;
_destY = endPosY;
_destHotspotId = destHotspot;
+ _walkToHotspotId = 0;
currentActions().addFront(START_WALKING, _roomNumber);
}
@@ -606,6 +610,7 @@ void Hotspot::setRandomDest() {
else
currentActions().top().setAction(START_WALKING);
_walkFlag = true;
+ setWalkToHotspot(0);
// Try up to 20 times to find an unoccupied destination
for (int tryCtr = 0; tryCtr < 20; ++tryCtr) {
@@ -1100,6 +1105,7 @@ bool Hotspot::characterWalkingCheck(uint16 id) {
int16 xp, yp;
bool altFlag;
HotspotData *hotspot;
+ uint16 walkToHotspotId = 0;
// Note that several invalid hotspot Ids are used to identify special walk to
// coordinates used throughout the game
@@ -1137,6 +1143,7 @@ bool Hotspot::characterWalkingCheck(uint16 id) {
yp = hotspot->walkY & 0x7fff;
altFlag = (hotspot->walkY & 0x8000) != 0;
}
+ walkToHotspotId = id;
break;
}
@@ -1146,6 +1153,7 @@ bool Hotspot::characterWalkingCheck(uint16 id) {
((((y() + heightCopy()) >> 3) - 1) != (yp >> 3))) {
// Walk to the specified destination
walkTo(xp, yp);
+ setWalkToHotspot(walkToHotspotId);
return true;
} else {
return false;
@@ -1156,6 +1164,7 @@ bool Hotspot::characterWalkingCheck(uint16 id) {
if ((ABS(x() - xp) >= 8) ||
(ABS(y() + heightCopy() - yp - 1) >= 19)) {
walkTo(xp, yp);
+ setWalkToHotspot(walkToHotspotId);
return true;
}
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h
index 64c4e0c58a3..d3ce7a690a3 100644
--- a/engines/lure/hotspots.h
+++ b/engines/lure/hotspots.h
@@ -214,7 +214,8 @@ private:
uint16 _frameCtr;
uint8 _voiceCtr;
int16 _destX, _destY;
- uint16 _destHotspotId;
+ uint16 _destHotspotId; // 0: walking to a coordinate, 0xffff: invalid sentinel, else: room-exit hotspot
+ uint16 _walkToHotspotId; // hotspot being approached for interaction; exempt from block-avoidance
uint16 _blockedOffset;
uint8 _exitCtr;
bool _walkFlag;
@@ -299,6 +300,7 @@ public:
int8 talkX() const { return _talkX; }
int8 talkY() const { return _talkY; }
uint16 destHotspotId() const { return _destHotspotId; }
+ uint16 walkToHotspot() const { return _walkToHotspotId; }
uint16 blockedOffset() const { return _blockedOffset; }
uint8 exitCtr() const { return _exitCtr; }
bool walkFlag() const { return _walkFlag; }
@@ -332,6 +334,7 @@ public:
void setPosition(int16 newX, int16 newY);
void setDestPosition(int16 newX, int16 newY) { _destX = newX; _destY = newY; }
void setDestHotspot(uint16 id) { _destHotspotId = id; }
+ void setWalkToHotspot(uint16 id) { _walkToHotspotId = id; }
void setExitCtr(uint8 value) { _exitCtr = value; }
BlockedState blockedState() const {
assert(_data);
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index ba76ce14e92..3d041b279b4 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -1129,6 +1129,11 @@ int PausedCharacterList::check(uint16 charId, int numImpinging, uint16 *impingin
// Entry is skipped if hotspot not present or is executing hotspot script
continue;
+ // Don't treat the hotspot we're deliberately walking up to as an obstacle
+ if (charHotspot->walkToHotspot() == hotspot->hotspotId()) {
+ continue;
+ }
+
// Scan through the pause list to see if there's a record for the
// calling character and the impinging list entry
bool foundEntry = false;
Commit: 3ce5430fb066d3879c7208f653bcd35c69ad1c79
https://github.com/scummvm/scummvm/commit/3ce5430fb066d3879c7208f653bcd35c69ad1c79
Author: Max H. Gerlach (git at maxgerlach.de)
Date: 2026-07-09T20:40:07+10:00
Commit Message:
LURE: Avoid endless loop at a room exit when set destination is unreachable
Assisted-by: Claude:claude-opus-4.8
Changed paths:
engines/lure/hotspots.cpp
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index ca09a76c358..af25f4e8526 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -4140,6 +4140,21 @@ void HotspotTickHandlers::npcRoomChange(Hotspot &h) {
RoomExitCoordinates &coords = res.coordinateList().getEntry(srcRoom);
RoomExitCoordinateData &exitData = coords.getData(destRoom);
+ // If the routing to an intermediate next-hop room leads straight back to srcRoom,
+ // the target is unreachable (routing cycle); give up and stay put in the current room.
+ uint16 nextHop = exitData.roomNumber & 0xff;
+ if ((nextHop != 0) && (nextHop != destRoom)) {
+ RoomExitCoordinates &nextHopCoords = res.coordinateList().getEntry(nextHop);
+ RoomExitCoordinateData &nextHopExitData = nextHopCoords.getData(destRoom);
+ uint16 backHop = nextHopExitData.roomNumber & 0xff;
+
+ if (backHop == srcRoom) {
+ h.currentActions().top().setRoomNumber(h.roomNumber());
+ h.setExitCtr(0);
+ return;
+ }
+ }
+
if (h.hotspotId() != RATPOUCH_ID) {
// Count up the number of characters in the room
HotspotList &list = res.activeHotspots();
Commit: 9fdaf71a5944921782fa89006dbee8985a341c4b
https://github.com/scummvm/scummvm/commit/9fdaf71a5944921782fa89006dbee8985a341c4b
Author: Max H. Gerlach (git at maxgerlach.de)
Date: 2026-07-09T20:40:07+10:00
Commit Message:
LURE: Don't start a conversation with a character that has none defined
Avoids crash when trying to talk to Skorl in Dining Hall (who immediately
assaults Diermot)
Assisted-by: Claude:claude-opus-4.8
Changed paths:
engines/lure/hotspots.cpp
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index af25f4e8526..a42338e3b45 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -1721,8 +1721,14 @@ void Hotspot::doTalkTo(HotspotData *hotspot) {
}
}
+ // Only start a conversation if the character actually has one defined for the
+ // current talk index.
+ uint16 talkId = getTalkId(hotspot);
+ if (talkId == 0)
+ return;
+
// Start talking with character
- startTalk(hotspot, getTalkId(hotspot));
+ startTalk(hotspot, talkId);
}
void Hotspot::doTell(HotspotData *hotspot) {
More information about the Scummvm-git-logs
mailing list