mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
SAGA2: Implement teleport party here command
This commit is contained in:
parent
7ecc231fcd
commit
108c5222a2
@ -71,6 +71,8 @@ Console::Console(Saga2Engine *vm) : GUI::Debugger() {
|
||||
|
||||
registerCmd("teleport_npc_here", WRAP_METHOD(Console, cmdTeleportNPCHere));
|
||||
|
||||
registerCmd("teleport_party_here", WRAP_METHOD(Console, cmdTeleportPartyHere));
|
||||
|
||||
registerCmd("save_loc", WRAP_METHOD(Console, cmdSaveLoc));
|
||||
|
||||
registerCmd("load_loc", WRAP_METHOD(Console, cmdLoadLoc));
|
||||
@ -289,6 +291,21 @@ bool Console::cmdTeleportNPCHere(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdTeleportPartyHere(int argc, const char **argv) {
|
||||
if (argc != 1)
|
||||
debugPrintf("Usage: %s\n", argv[0]);
|
||||
else {
|
||||
TilePoint loc = getCenterActor()->getLocation();
|
||||
|
||||
for (ObjectID id = ActorBaseID; id < ActorBaseID + kPlayerActors; ++id) {
|
||||
Actor *p = (Actor *)GameObject::objectAddress(id);
|
||||
p->setLocation(loc);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdSaveLoc(int argc, const char **argv) {
|
||||
if (argc != 1)
|
||||
debugPrintf("Usage: %s\n", argv[0]);
|
||||
|
@ -69,6 +69,8 @@ private:
|
||||
|
||||
bool cmdTeleportNPCHere(int argc, const char **argv);
|
||||
|
||||
bool cmdTeleportPartyHere(int argc, const char **argv);
|
||||
|
||||
bool cmdSaveLoc(int argc, const char **argv);
|
||||
|
||||
bool cmdLoadLoc(int argc, const char **argv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user