Flip timed effects
In wizard mode, freezing some water on the ground, then flipping the level did not flip the coordinate of the ice thawing timed effect. This could cause an impossible complaint.
This commit is contained in:
14
src/sp_lev.c
14
src/sp_lev.c
@@ -447,6 +447,7 @@ boolean extras;
|
||||
struct monst *mtmp;
|
||||
struct engr *etmp;
|
||||
struct mkroom *sroom;
|
||||
timer_element *timer;
|
||||
|
||||
get_level_extends(&minx, &miny, &maxx, &maxy);
|
||||
/* get_level_extends() returns -1,-1 to COLNO,ROWNO at max */
|
||||
@@ -712,6 +713,19 @@ boolean extras;
|
||||
}
|
||||
}
|
||||
|
||||
/* timed effects */
|
||||
for (timer = g.timer_base; timer; timer = timer->next) {
|
||||
if (timer->func_index == MELT_ICE_AWAY) {
|
||||
long ty = ((long)timer->arg.a_void) & 0xFFFF;
|
||||
long tx = (((long)timer->arg.a_void) >> 16) & 0xFFFF;
|
||||
if (flp & 1)
|
||||
ty = FlipY(ty);
|
||||
if (flp & 2)
|
||||
tx = FlipX(tx);
|
||||
timer->arg.a_void = (genericptr_t)((tx << 16) | ty);
|
||||
}
|
||||
}
|
||||
|
||||
if (extras) {
|
||||
/* flip hero location only if inside the flippable area */
|
||||
if (!(u.ux < minx || u.ux > maxx || u.uy < miny || u.uy > maxy)) {
|
||||
|
||||
Reference in New Issue
Block a user