Skip to content

Commit

Permalink
[MY] Fix elevator positioning when going up or down
Browse files Browse the repository at this point in the history
Fixes #154
  • Loading branch information
TheFakeMontyOnTheRun committed Jun 16, 2024
1 parent 02b7ba5 commit 843ddc6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/src/Core.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,14 @@ void moveBy(uint8_t direction) {
playerLocation = room->connections[direction];
room = &rooms[playerLocation];

for (c = 0; c < 6; ++c) {
if (room->connections[c] == previousLocation) {
direction = c;
if (direction < 4) {
for (c = 0; c < 6; ++c) {
if (room->connections[c] == previousLocation) {
direction = c;
}
}
} else {
return;
}

switch (direction) {
Expand Down
6 changes: 6 additions & 0 deletions my_frontend/src/Crawler.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ enum EGameMenuState Crawler_tickCallback(enum ECommand cmd, void* data) {

case kCommandFire3:
pickItem();

if (playerLocation != previousLocation) {
redrawMap = needsToRedrawHUD = needsToRedrawVisibleMeshes = 1;
initMap();
}

break;

case kCommandFire4:
Expand Down

0 comments on commit 843ddc6

Please sign in to comment.