Allow default scripts

Fix an issue where vanity script overwrote always
This commit is contained in:
David Markowitz 2023-06-16 20:09:36 -07:00 committed by GitHub
parent 1a74c028c2
commit 5bdd030faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ void VanityUtilities::SpawnVanity() {
auto* scriptComponent = npcEntity->GetComponent<ScriptComponent>();
if (scriptComponent != nullptr) {
if (scriptComponent && !npc.m_Script.empty()) {
scriptComponent->SetScript(npc.m_Script);
scriptComponent->SetSerialized(false);