Code simplification.
This commit is contained in:
parent
c3453db345
commit
473bdfaa2a
1 changed files with 3 additions and 6 deletions
9
main.c
9
main.c
|
@ -467,14 +467,13 @@ static bool dwarfmove(void)
|
||||||
static void croak(FILE *cmdin)
|
static void croak(FILE *cmdin)
|
||||||
/* Okay, he's dead. Let's get on with it. */
|
/* Okay, he's dead. Let's get on with it. */
|
||||||
{
|
{
|
||||||
|
++game.numdie;
|
||||||
if (game.closng) {
|
if (game.closng) {
|
||||||
/* He died during closing time. No resurrection. Tally up a
|
/* He died during closing time. No resurrection. Tally up a
|
||||||
* death and exit. */
|
* death and exit. */
|
||||||
RSPEAK(131);
|
RSPEAK(131);
|
||||||
++game.numdie;
|
|
||||||
score(0);
|
score(0);
|
||||||
} else {
|
} else {
|
||||||
++game.numdie;
|
|
||||||
if (!YES(cmdin,79+game.numdie*2,80+game.numdie*2,54))
|
if (!YES(cmdin,79+game.numdie*2,80+game.numdie*2,54))
|
||||||
score(0);
|
score(0);
|
||||||
if (game.numdie == MAXDIE)
|
if (game.numdie == MAXDIE)
|
||||||
|
@ -486,10 +485,8 @@ static void croak(FILE *cmdin)
|
||||||
for (int j=1; j<=NOBJECTS; j++) {
|
for (int j=1; j<=NOBJECTS; j++) {
|
||||||
int i=NOBJECTS + 1 - j;
|
int i=NOBJECTS + 1 - j;
|
||||||
if (TOTING(i)) {
|
if (TOTING(i)) {
|
||||||
int k=game.oldlc2;
|
/* Always leave lamp where it's accessible aboveground */
|
||||||
if (i == LAMP)
|
DROP(i, (i == LAMP) ? 1 : game.oldlc2);
|
||||||
k=1;
|
|
||||||
DROP(i,k);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
game.loc=3;
|
game.loc=3;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue