fix(Core/Vmaps): Stop M2s from occluding for spellcast LoS. Original autho… (#11341)

* Core/Vmaps: Stop M2s from occluding for spellcast LoS. Original authors: @Shauren & @HelloKitty

Fixes #11293

* buildfix.

Co-Authored-By: HelloKitty <5829095+HelloKitty@users.noreply.github.com>
This commit is contained in:
UltraNix
2022-04-10 14:24:35 +02:00
committed by GitHub
parent 6efc08f42e
commit 47790c9714
27 changed files with 295 additions and 101 deletions

View File

@@ -647,6 +647,25 @@ struct GameObjectTemplate
{
return IsForQuests;
}
[[nodiscard]] bool IsIgnoringLOSChecks() const
{
switch (type)
{
case GAMEOBJECT_TYPE_BUTTON:
return button.losOK == 0;
case GAMEOBJECT_TYPE_QUESTGIVER:
return questgiver.losOK == 0;
case GAMEOBJECT_TYPE_CHEST:
return chest.losOK == 0;
case GAMEOBJECT_TYPE_GOOBER:
return goober.losOK == 0;
case GAMEOBJECT_TYPE_FLAGSTAND:
return flagstand.losOK == 0;
default:
return false;
}
}
};
// From `gameobject_template_addon`