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
|
// lower chance of rare monsters
|
||||||
F_EXTRAMP, // lf has +v0 % extra maxmp
|
F_EXTRAMP, // lf has +v0 % extra maxmp
|
||||||
F_FEIGNINGDEATH, // lf is pretending to be dead
|
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_FASTACT, // modifier for action speed
|
||||||
F_FASTMETAB, // hunger counter increases faster, poison cures faster.
|
F_FASTMETAB, // hunger counter increases faster, poison cures faster.
|
||||||
// v0 is multiplier.
|
// 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, ", ");
|
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||||
strcat(extrainfo, "prone");
|
strcat(extrainfo, "prone");
|
||||||
} else if (isairborne(c->lf, &height)) {
|
} else if (isairborne(c->lf, &height)) {
|
||||||
|
double metres;
|
||||||
|
metres = ((double)height) / 2;
|
||||||
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||||
if (lfhasflag(c->lf, F_FLYING)) {
|
if (lfhasflag(c->lf, F_FLYING)) {
|
||||||
char fbuf[BUFLEN];
|
char fbuf[BUFLEN];
|
||||||
sprintf(fbuf, "flying:%d",height);
|
sprintf(fbuf, "flying:%0.2gm",metres);
|
||||||
strcat(extrainfo, fbuf);
|
strcat(extrainfo, fbuf);
|
||||||
} else if (lfhasflag(c->lf, F_LEVITATING)) {
|
} else if (lfhasflag(c->lf, F_LEVITATING)) {
|
||||||
strcat(extrainfo, "levitating");
|
strcat(extrainfo, "levitating");
|
||||||
|
|
|
@ -13326,7 +13326,6 @@ int readsomething(lifeform_t *lf, object_t *o) {
|
||||||
// still reveal around it
|
// still reveal around it
|
||||||
setcellknownradius(destcell, PR_MASTER, 5, DT_ORTH);
|
setcellknownradius(destcell, PR_MASTER, 5, DT_ORTH);
|
||||||
needredraw = B_TRUE;
|
needredraw = B_TRUE;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
getdisttext(lf->cell, destcell, distbuf, distbufbad, dirbuf);
|
getdisttext(lf->cell, destcell, distbuf, distbufbad, dirbuf);
|
||||||
|
|
Loading…
Reference in New Issue