From 831796fcd44f397a85996dfc4216da554a2dbb52 Mon Sep 17 00:00:00 2001 From: Cesar Canassa Date: Mon, 18 Jul 2022 13:10:20 +0200 Subject: [PATCH] :recycle: Remove _misource access from SpawnLightning --- Source/missiles.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index c274a81a7..138303f3f 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -641,8 +641,7 @@ void SpawnLightning(Missile &missile, int dam) if (!TileHasAny(pn, TileProperties::BlockMissile)) { if (position != Point { missile.var1, missile.var2 } && InDungeonBounds(position)) { missile_id type = MIS_LIGHTNING; - if (!missile.IsTrap() && missile._micaster == TARGET_PLAYERS - && IsAnyOf(Monsters[missile._misource].type().type, MT_STORM, MT_RSTORM, MT_STORML, MT_MAEL)) { + if (IsAnyOf(missile.sourceMonster()->type().type, MT_STORM, MT_RSTORM, MT_STORML, MT_MAEL)) { type = MIS_LIGHTNING2; } AddMissile(