- takedamage() should end instantly if object is aleady dead.
This commit is contained in:
parent
8730225c6e
commit
c6f3f3f9bd
2
data.c
2
data.c
|
@ -2490,7 +2490,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_VSTAIRSDOWN, "metal hatch leading down", "A study metal hatchway set into the floor.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addot(OT_VSTAIRSDOWN, "metal hatch leading down", "A sturdy metal hatchway set into the floor.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_METAL, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "staircase");
|
||||
|
|
|
@ -10687,6 +10687,9 @@ int obpropsmatch(object_t *a, object_t *b) {
|
|||
|
||||
flag_t *obrestrictsmovement(object_t *o, lifeform_t *lf) {
|
||||
flag_t *f;
|
||||
|
||||
if (isdeadob(o)) return NULL;
|
||||
|
||||
f = hasflag(o->flags, F_RESTRICTMOVEMENT);
|
||||
if (f) {
|
||||
if (!lf) return NULL;
|
||||
|
@ -14908,6 +14911,10 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce, lif
|
|||
flag_t *hpflag, *f;
|
||||
int damtaken = 0;
|
||||
|
||||
if (isdeadob(o)) {
|
||||
return howmuch;
|
||||
}
|
||||
|
||||
// some checks need to happen before
|
||||
// making sure the damage will happen.
|
||||
// for example, even if an object is
|
||||
|
|
Loading…
Reference in New Issue