Merge branch 'lightsource-mon-ptr' of https://github.com/entrez/NetHack into pr625

This commit is contained in:
nhmall
2021-10-28 18:17:52 -04:00
+2 -2
View File
@@ -2016,11 +2016,11 @@ create_monster(monster* m, struct mkroom* croom)
/* used to give light, now doesn't, or vice versa, /* used to give light, now doesn't, or vice versa,
or light's range has changed */ or light's range has changed */
if (emits_light(olddata)) if (emits_light(olddata))
del_light_source(LS_MONSTER, (genericptr_t) mtmp); del_light_source(LS_MONSTER, monst_to_any(mtmp));
if (emits_light(mtmp->data)) if (emits_light(mtmp->data))
new_light_source(mtmp->mx, mtmp->my, new_light_source(mtmp->mx, mtmp->my,
emits_light(mtmp->data), emits_light(mtmp->data),
LS_MONSTER, (genericptr_t) mtmp); LS_MONSTER, monst_to_any(mtmp));
} }
if (!mtmp->perminvis || pm_invisible(olddata)) if (!mtmp->perminvis || pm_invisible(olddata))
mtmp->perminvis = pm_invisible(mdat); mtmp->perminvis = pm_invisible(mdat);