Fixed crash when 'what goes up' is active and a thrown missile is destroyed.
This commit is contained in:
parent
0b76162f5f
commit
729da5bb52
20
objects.c
20
objects.c
|
@ -16243,16 +16243,18 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
|
|||
}
|
||||
|
||||
if (thrower && hasactivespell(thrower, OT_S_WHATGOESUP)) {
|
||||
// on the ground?
|
||||
if ((newob->pile->where == where) && haslof(newob->pile->where, thrower->cell, LOF_NEED, NULL)) {
|
||||
if (isplayer(thrower)) {
|
||||
msg("%s returns to you!", obname);
|
||||
} else if (cansee(player, thrower)) {
|
||||
msg("%s returns to %s!", obname, throwername);
|
||||
} else if (haslos(player, newob->pile->where)) {
|
||||
msg("%s returns to someone!", obname);
|
||||
if (newob && !isdeadob(newob)) {
|
||||
// on the ground?
|
||||
if ((newob->pile->where == where) && haslof(newob->pile->where, thrower->cell, LOF_NEED, NULL)) {
|
||||
if (isplayer(thrower)) {
|
||||
msg("%s returns to you!", obname);
|
||||
} else if (cansee(player, thrower)) {
|
||||
msg("%s returns to %s!", obname, throwername);
|
||||
} else if (haslos(player, newob->pile->where)) {
|
||||
msg("%s returns to someone!", obname);
|
||||
}
|
||||
moveob(newob, thrower->pack, newob->amt);
|
||||
}
|
||||
moveob(newob, thrower->pack, newob->amt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue