When looking at flying creatures, show their height (in metres).
This commit is contained in:
parent
c4a576d6ca
commit
cb97ac1f26
2
defs.h
2
defs.h
|
@ -4185,7 +4185,7 @@ enum FLAG {
|
|||
// lower chance of rare monsters
|
||||
F_EXTRAMP, // lf has +v0 % extra maxmp
|
||||
F_FEIGNINGDEATH, // lf is pretending to be dead
|
||||
F_FLYING, // lf is flying. v0 = feet height
|
||||
F_FLYING, // lf is flying. v0 = feet height (v0 / 2 = metres off the ground)
|
||||
F_FASTACT, // modifier for action speed
|
||||
F_FASTMETAB, // hunger counter increases faster, poison cures faster.
|
||||
// v0 is multiplier.
|
||||
|
|
4
io.c
4
io.c
|
@ -847,10 +847,12 @@ cell_t *real_askcoords(char *prompt, char *subprompt, int targettype, lifeform_t
|
|||
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||
strcat(extrainfo, "prone");
|
||||
} else if (isairborne(c->lf, &height)) {
|
||||
double metres;
|
||||
metres = ((double)height) / 2;
|
||||
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||
if (lfhasflag(c->lf, F_FLYING)) {
|
||||
char fbuf[BUFLEN];
|
||||
sprintf(fbuf, "flying:%d",height);
|
||||
sprintf(fbuf, "flying:%0.2gm",metres);
|
||||
strcat(extrainfo, fbuf);
|
||||
} else if (lfhasflag(c->lf, F_LEVITATING)) {
|
||||
strcat(extrainfo, "levitating");
|
||||
|
|
Loading…
Reference in New Issue