[Scummvm-git-logs] scummvm master -> 1d62fd293a3b5336b7d24c7a0ac992084784e277
neuromancer
noreply at scummvm.org
Fri Mar 29 10:39:20 UTC 2024
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e52f2643fd FREESCAPE: fixed bug when loading a game state in eclipse
c06f914e80 FREESCAPE: add a small tolerance when detecting collisions of smaller objects
1d62fd293a FREESCAPE: correctly load certain saved games
Commit: e52f2643fd4e0e9400bbf92fd6e169dc49d485bf
https://github.com/scummvm/scummvm/commit/e52f2643fd4e0e9400bbf92fd6e169dc49d485bf
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-29T11:39:54+01:00
Commit Message:
FREESCAPE: fixed bug when loading a game state in eclipse
Changed paths:
engines/freescape/games/driller/driller.cpp
engines/freescape/games/eclipse/eclipse.cpp
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index ca1ba536975..d0fd53e4fe6 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -161,7 +161,11 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
error("Invalid movement across areas");
assert(newPos != -1);
_sensors = _currentArea->getSensors();
- }
+ } else if (entranceID == -1)
+ debugC(1, kFreescapeDebugMove, "Loading game, no change in position");
+ else
+ error("Invalid area change!");
+
_lastPosition = _position;
_gameStateVars[0x1f] = 0;
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index f9d7fb85172..fcb28d43bdd 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -156,11 +156,12 @@ void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
_currentAreaMessages.clear();
_currentAreaMessages.push_back(_currentArea->_name);
- if (entranceID == -1)
- return;
-
- assert(entranceID > 0);
- traverseEntrance(entranceID);
+ if (entranceID > 0)
+ traverseEntrance(entranceID);
+ else if (entranceID == -1)
+ debugC(1, kFreescapeDebugMove, "Loading game, no change in position");
+ else
+ error("Invalid area change!");
_lastPosition = _position;
Commit: c06f914e80a84d9c0996f8afc4cda48f1ec02685
https://github.com/scummvm/scummvm/commit/c06f914e80a84d9c0996f8afc4cda48f1ec02685
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-29T11:39:54+01:00
Commit Message:
FREESCAPE: add a small tolerance when detecting collisions of smaller objects
Changed paths:
engines/freescape/area.cpp
diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index 548f94d402b..631427ebff6 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -262,7 +262,7 @@ Object *Area::checkCollisionRay(const Math::Ray &ray, int raySize) {
if (collidedDistance >= 1.0)
continue;
- if (collidedDistance < distance || (collidedDistance == distance && gobj->getSize().length() < size)) {
+ if (collidedDistance < distance || (ABS(collidedDistance - distance) <= 0.05 && gobj->getSize().length() < size)) {
collided = obj;
size = gobj->getSize().length();
distance = collidedDistance;
Commit: 1d62fd293a3b5336b7d24c7a0ac992084784e277
https://github.com/scummvm/scummvm/commit/1d62fd293a3b5336b7d24c7a0ac992084784e277
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-29T11:39:54+01:00
Commit Message:
FREESCAPE: correctly load certain saved games
Changed paths:
engines/freescape/area.cpp
diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index 631427ebff6..6f6dc0940c8 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -145,14 +145,11 @@ void Area::loadObjects(Common::SeekableReadStream *stream, Area *global) {
float y = stream->readFloatLE();
float z = stream->readFloatLE();
Object *obj = nullptr;
- if (_objectsByID->contains(key)) {
- obj = (*_objectsByID)[key];
- } else {
- obj = global->objectWithID(key);
- assert(obj);
- obj = (Object *)((GeometricObject *)obj)->duplicate();
- addObject(obj);
- }
+ if (!_objectsByID->contains(key))
+ addObjectFromArea(key, global);
+
+ obj = (*_objectsByID)[key];
+ assert(obj);
obj->setObjectFlags(flags);
obj->setOrigin(Math::Vector3d(x, y, z));
}
More information about the Scummvm-git-logs
mailing list