mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-25 18:05:15 +00:00
fixed some bugs with push
This commit is contained in:
@@ -513,7 +513,9 @@ struct changes_t {
|
|||||||
|
|
||||||
void push_push(cell *tgt) {
|
void push_push(cell *tgt) {
|
||||||
pushes.push_back(tgt);
|
pushes.push_back(tgt);
|
||||||
rollbacks.push_back([] { pushes.pop_back(); });
|
auto v = [] { pushes.pop_back(); };
|
||||||
|
rollbacks.push_back(v);
|
||||||
|
commits.push_back(v);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@@ -757,6 +759,7 @@ bool pcmove::after_escape() {
|
|||||||
nextmovetype = lmMove;
|
nextmovetype = lmMove;
|
||||||
addMessage(XLAT("You push %the1 behind you!", waBigStatue));
|
addMessage(XLAT("You push %the1 behind you!", waBigStatue));
|
||||||
animateMovement(mi.rev(), LAYER_BOAT);
|
animateMovement(mi.rev(), LAYER_BOAT);
|
||||||
|
changes.push_push(cwt.at);
|
||||||
return perform_actual_move();
|
return perform_actual_move();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user