kicking coins bit (trunk only)
While looking into the ``NH343 bug - tamed a dog in a shop by kicking food without being charged'' report (it's reproducible with current code), I spotted a problem with some post-3.4.3 code. Ancient compilers can't handle initializers on auto arrays; this was probably meant to be static in the first place.
This commit is contained in:
12
src/dokick.c
12
src/dokick.c
@@ -549,14 +549,16 @@ xchar x, y;
|
|||||||
kickobj = splitobj(kickobj, 1L);
|
kickobj = splitobj(kickobj, 1L);
|
||||||
} else {
|
} else {
|
||||||
if (rn2(20)) {
|
if (rn2(20)) {
|
||||||
const char *flyingcoinmsg[] = {
|
static NEARDATA const char * const flyingcoinmsg[] = {
|
||||||
"scatter the coins",
|
"scatter the coins",
|
||||||
"knock coins all over the place",
|
"knock coins all over the place",
|
||||||
"send coins flying in all directions",
|
"send coins flying in all directions",
|
||||||
};
|
};
|
||||||
|
|
||||||
pline("Thwwpingg!");
|
pline("Thwwpingg!");
|
||||||
You("%s!", flyingcoinmsg[rn2(SIZE(flyingcoinmsg))]);
|
You("%s!", flyingcoinmsg[rn2(SIZE(flyingcoinmsg))]);
|
||||||
(void) scatter(x, y, rn2(3)+1, VIS_EFFECTS|MAY_HIT, kickobj);
|
(void)scatter(x, y, rn2(3)+1,
|
||||||
|
VIS_EFFECTS|MAY_HIT, kickobj);
|
||||||
newsym(x, y);
|
newsym(x, y);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user