bouncing zaps
As From a bug report, don't let bounces go past the edge of closed doors. His suggested patch included some redundancy, which I've removed.
This commit is contained in:
@@ -319,6 +319,7 @@ various missing or inappropriate "killed by" death messages
|
|||||||
second attack for two-weapon combat will miss if first knocks target away
|
second attack for two-weapon combat will miss if first knocks target away
|
||||||
jousting effect no longer occurs every time riding character hits with lance
|
jousting effect no longer occurs every time riding character hits with lance
|
||||||
skeletons should be able to wear the armor they're created with
|
skeletons should be able to wear the armor they're created with
|
||||||
|
bouncing zaps should not bounce around the edge of closed doors
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -3441,10 +3441,12 @@ register int dx,dy;
|
|||||||
dy = -dy;
|
dy = -dy;
|
||||||
} else {
|
} else {
|
||||||
if(isok(sx,lsy) && ZAP_POS(rmn = levl[sx][lsy].typ) &&
|
if(isok(sx,lsy) && ZAP_POS(rmn = levl[sx][lsy].typ) &&
|
||||||
|
!closed_door(sx,lsy) &&
|
||||||
(IS_ROOM(rmn) || (isok(sx+dx,lsy) &&
|
(IS_ROOM(rmn) || (isok(sx+dx,lsy) &&
|
||||||
ZAP_POS(levl[sx+dx][lsy].typ))))
|
ZAP_POS(levl[sx+dx][lsy].typ))))
|
||||||
bounce = 1;
|
bounce = 1;
|
||||||
if(isok(lsx,sy) && ZAP_POS(rmn = levl[lsx][sy].typ) &&
|
if(isok(lsx,sy) && ZAP_POS(rmn = levl[lsx][sy].typ) &&
|
||||||
|
!closed_door(lsx,sy) &&
|
||||||
(IS_ROOM(rmn) || (isok(lsx,sy+dy) &&
|
(IS_ROOM(rmn) || (isok(lsx,sy+dy) &&
|
||||||
ZAP_POS(levl[lsx][sy+dy].typ))))
|
ZAP_POS(levl[lsx][sy+dy].typ))))
|
||||||
if(!bounce || rn2(2))
|
if(!bounce || rn2(2))
|
||||||
|
|||||||
Reference in New Issue
Block a user