Fixed crash when 'what goes up' is active and a thrown missile is destroyed.

This commit is contained in:
Rob Pearce 2016-06-13 23:38:45 +10:00
parent 0b76162f5f
commit 729da5bb52
1 changed files with 11 additions and 9 deletions

View File

@ -16243,6 +16243,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
}
if (thrower && hasactivespell(thrower, OT_S_WHATGOESUP)) {
if (newob && !isdeadob(newob)) {
// on the ground?
if ((newob->pile->where == where) && haslof(newob->pile->where, thrower->cell, LOF_NEED, NULL)) {
if (isplayer(thrower)) {
@ -16256,6 +16257,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
}
}
}
}
if (newob && !isdeadob(newob)) {
killflagsofid(newob->flags, F_THROWNBY);