Skip to content

Commit

Permalink
remove debugger hack from enterLocation. add sanity check to "room" c…
Browse files Browse the repository at this point in the history
…ommand.
  • Loading branch information
salty-horse committed Apr 5, 2008
1 parent b538121 commit 2945d32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions debugger.cpp
Expand Up @@ -42,8 +42,13 @@ Debugger::Debugger(KomEngine *vm) : GUI::Debugger(), _vm(vm) {
bool Debugger::Cmd_Room(int argc, const char **argv) {
if (argc == 2) {
uint16 roomNum = atoi(argv[1]);
if (roomNum == 0)
return false;

_vm->game()->settings()->currLocation = roomNum;
_vm->database()->getChar(0)->_locationId = roomNum;
_vm->database()->getChar(0)->_lastLocation = roomNum;

_vm->game()->enterLocation(roomNum);
return false;
}
Expand Down
3 changes: 0 additions & 3 deletions game.cpp
Expand Up @@ -50,9 +50,6 @@ Game::~Game() {
void Game::enterLocation(uint16 locId) {
char filename[50];

// FIXME - hack
_vm->database()->getChar(0)->_lastLocation = locId;

_vm->panel()->showLoading(true);

// Unload last room elements
Expand Down

0 comments on commit 2945d32

Please sign in to comment.