Fix crash when casting telekinesis.
This commit is contained in:
parent
7fa750baef
commit
09a8152cd3
4
spell.c
4
spell.c
|
@ -4176,11 +4176,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
targcell = retcell[maxr];
|
||||
}
|
||||
|
||||
// adjust for LOF (we already validated this during castspell()'s call to validatespellcell(),
|
||||
// adjust for LOF - we already validated this during castspell()'s call to validatespellcell(),
|
||||
// but check again in case, for example, there was an invisible lf in the way which we couldn't
|
||||
// see.
|
||||
loft = getspellloftype(spellid);
|
||||
if (loft != LOF_DONTNEED) {
|
||||
if (targcell && (loft != LOF_DONTNEED)) {
|
||||
cell_t *newtarg;
|
||||
haslof(caster->cell, targcell, loft, &newtarg);
|
||||
targcell = newtarg;
|
||||
|
|
Loading…
Reference in New Issue