mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-08 23:20:12 +00:00
fixed monster cloned after pushing
This commit is contained in:
parent
4af00c37e8
commit
4415db42c2
@ -568,6 +568,7 @@ bool pcmove::actual_move() {
|
|||||||
|
|
||||||
if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
|
if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
|
||||||
mip = determinePush(cwt, subdir, [c2] (cell *c) { return canPushThumperOn(c, c2, cwt.at); });
|
mip = determinePush(cwt, subdir, [c2] (cell *c) { return canPushThumperOn(c, c2, cwt.at); });
|
||||||
|
if(mip.t) changes.ccell(mip.t);
|
||||||
if(mip.d == NO_SPACE) {
|
if(mip.d == NO_SPACE) {
|
||||||
addMessage(XLAT("No room to push %the1.", c2->wall));
|
addMessage(XLAT("No room to push %the1.", c2->wall));
|
||||||
return false;
|
return false;
|
||||||
@ -862,6 +863,7 @@ bool pcmove::attack() {
|
|||||||
mip = determinePush(cwt, subdir, [c2] (cell *c) { return passable(c, c2, P_BLOW); });
|
mip = determinePush(cwt, subdir, [c2] (cell *c) { return passable(c, c2, P_BLOW); });
|
||||||
else
|
else
|
||||||
mip.t = c2;
|
mip.t = c2;
|
||||||
|
if(mip.t) changes.ccell(mip.t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(havePushConflict(mip.t, checkonly)) return false;
|
if(havePushConflict(mip.t, checkonly)) return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user