Attempting to move into tile that blocks shouldnt result in wait action
This commit is contained in:
@@ -405,10 +405,14 @@ export class GameScene extends Phaser.Scene {
|
||||
}
|
||||
|
||||
private commitPlayerAction(action: Action) {
|
||||
const playerEvents = applyAction(this.world, this.playerId, action, this.entityManager);
|
||||
|
||||
if (playerEvents.some(ev => ev.type === "move-blocked")) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.awaitingPlayer = false;
|
||||
this.followPlayer = true;
|
||||
|
||||
const playerEvents = applyAction(this.world, this.playerId, action, this.entityManager);
|
||||
|
||||
// Check for pickups right after move (before enemy turn, so you get it efficiently)
|
||||
if (action.type === "move") {
|
||||
|
||||
Reference in New Issue
Block a user