[Scummvm-git-logs] scummvm master -> cc9e112751b2a96a73eda4d7f82db4a4214cad58
whoozle
noreply at scummvm.org
Sun Mar 8 22:37:41 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
cc9e112751 PHOENIXVR: skip gotowarp <current-warp>
Commit: cc9e112751b2a96a73eda4d7f82db4a4214cad58
https://github.com/scummvm/scummvm/commit/cc9e112751b2a96a73eda4d7f82db4a4214cad58
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-08T22:36:39Z
Commit Message:
PHOENIXVR: skip gotowarp <current-warp>
Changed paths:
engines/phoenixvr/commands.h
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/commands.h b/engines/phoenixvr/commands.h
index d3bdc3f8b70..21683f25729 100644
--- a/engines/phoenixvr/commands.h
+++ b/engines/phoenixvr/commands.h
@@ -834,8 +834,10 @@ struct GoToWarp : public Script::Command {
GoToWarp(Common::String w) : warp(Common::move(w)) {}
void exec(Script::ExecutionContext &ctx) const override {
- g_engine->goToWarp(warp);
- ctx.running = false; // terminate script after warp
+ // terminate script after successful warp.
+ // continue if not (for instance, goto to the same location)
+ if (g_engine->goToWarp(warp))
+ ctx.running = false;
}
};
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index bec0ff86847..85619a2a5c5 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -240,8 +240,12 @@ void PhoenixVREngine::wait(float seconds) {
}
}
-void PhoenixVREngine::goToWarp(const Common::String &warp, bool savePrev) {
+bool PhoenixVREngine::goToWarp(const Common::String &warp, bool savePrev) {
debug("gotowarp %s, save prev: %d", warp.c_str(), savePrev);
+ if (_warp && _warp->vrFile == warp) {
+ debug("already at this location, skipping");
+ return false;
+ }
// Typo in Necronomicon's Script4.lst
if (getGameId() == "necrono" && warp == "N3M09L03W515E1.vr")
@@ -258,6 +262,7 @@ void PhoenixVREngine::goToWarp(const Common::String &warp, bool savePrev) {
screenshot->convertToInPlace(_rgb565);
_thumbnail.simpleBlitFrom(*screenshot, Graphics::FLIP_V);
}
+ return true;
}
void PhoenixVREngine::returnToWarp() {
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 1ecaecd5f57..b82b226f4b8 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -111,7 +111,7 @@ public:
// Script API
void setNextScript(const Common::String &path);
- void goToWarp(const Common::String &warp, bool savePrev = false);
+ bool goToWarp(const Common::String &warp, bool savePrev = false);
void returnToWarp();
void setCursorDefault(int idx, const Common::String &path);
void setCursor(const Common::String &path, const Common::String &warp, int idx);
More information about the Scummvm-git-logs
mailing list