B02005 - Boulder and vision
add another bit to the flags passed to launch_obj so it can print the initial "rumbling" message at the appropriate time rather than having the caller print the message, possibly out of order.
This commit is contained in:
@@ -67,6 +67,7 @@ poison missiles were unintentionally more likely to inflict "deadly poison"
|
|||||||
than in pre-3.4.1 releases
|
than in pre-3.4.1 releases
|
||||||
provide feedback when going invisible after eating a stalker
|
provide feedback when going invisible after eating a stalker
|
||||||
killer on tombstone had no prefix for starvation/exhaustion case
|
killer on tombstone had no prefix for starvation/exhaustion case
|
||||||
|
ensure proper message ordering for boulder trap messages
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
|||||||
/* Macros for launching objects */
|
/* Macros for launching objects */
|
||||||
#define ROLL 0x01 /* the object is rolling */
|
#define ROLL 0x01 /* the object is rolling */
|
||||||
#define FLING 0x02 /* the object is flying thru the air */
|
#define FLING 0x02 /* the object is flying thru the air */
|
||||||
|
#define LAUNCH_UNSEEN 0x40 /* hero neither caused nor saw it */
|
||||||
#define LAUNCH_KNOWN 0x80 /* the hero caused this by explicit action */
|
#define LAUNCH_KNOWN 0x80 /* the hero caused this by explicit action */
|
||||||
|
|
||||||
/* Macros for explosion types */
|
/* Macros for explosion types */
|
||||||
|
|||||||
+17
-10
@@ -1274,11 +1274,19 @@ int style;
|
|||||||
dx = sgn(x2 - x1);
|
dx = sgn(x2 - x1);
|
||||||
dy = sgn(y2 - y1);
|
dy = sgn(y2 - y1);
|
||||||
switch (style) {
|
switch (style) {
|
||||||
|
case ROLL|LAUNCH_UNSEEN:
|
||||||
|
if (otyp == BOULDER) {
|
||||||
|
You_hear(Hallucination ?
|
||||||
|
"someone bowling." :
|
||||||
|
"rumbling in the distance.");
|
||||||
|
}
|
||||||
|
goto roll;
|
||||||
case ROLL|LAUNCH_KNOWN:
|
case ROLL|LAUNCH_KNOWN:
|
||||||
/* use otrapped as a flag to ohitmon */
|
/* use otrapped as a flag to ohitmon */
|
||||||
singleobj->otrapped = 1;
|
singleobj->otrapped = 1;
|
||||||
style &= ~LAUNCH_KNOWN;
|
style &= ~LAUNCH_KNOWN;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
roll:
|
||||||
case ROLL:
|
case ROLL:
|
||||||
delaycnt = 2;
|
delaycnt = 2;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
@@ -2035,24 +2043,23 @@ glovecheck: target = which_armor(mtmp, W_ARMG);
|
|||||||
|
|
||||||
case ROLLING_BOULDER_TRAP:
|
case ROLLING_BOULDER_TRAP:
|
||||||
if (!is_flyer(mptr)) {
|
if (!is_flyer(mptr)) {
|
||||||
|
int style = ROLL | (in_sight ? 0 : LAUNCH_UNSEEN);
|
||||||
|
|
||||||
newsym(mtmp->mx,mtmp->my);
|
newsym(mtmp->mx,mtmp->my);
|
||||||
if (in_sight)
|
if (in_sight)
|
||||||
pline("Click! %s triggers %s.", Monnam(mtmp),
|
pline("Click! %s triggers %s.", Monnam(mtmp),
|
||||||
trap->tseen ?
|
trap->tseen ?
|
||||||
"a rolling boulder trap" :
|
"a rolling boulder trap" :
|
||||||
something);
|
something);
|
||||||
if (launch_obj(BOULDER, trap->launch.x, trap->launch.y,
|
if (launch_obj(BOULDER, trap->launch.x, trap->launch.y,
|
||||||
trap->launch2.x, trap->launch2.y, ROLL)) {
|
trap->launch2.x, trap->launch2.y, style)) {
|
||||||
if (in_sight) trap->tseen = TRUE;
|
if (in_sight) trap->tseen = TRUE;
|
||||||
else You_hear(Hallucination ?
|
if (mtmp->mhp <= 0) trapkilled = TRUE;
|
||||||
"someone bowling." :
|
|
||||||
"rumbling in the distance.");
|
|
||||||
if (mtmp->mhp <= 0) trapkilled = TRUE;
|
|
||||||
} else {
|
} else {
|
||||||
deltrap(trap);
|
deltrap(trap);
|
||||||
newsym(mtmp->mx,mtmp->my);
|
newsym(mtmp->mx,mtmp->my);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user