fix scripts

split speed out to use target as caster
fix armor skill
This commit is contained in:
Aaron Kimbre
2023-04-09 13:21:57 -05:00
parent bed269ffbe
commit 09e9bb2c15
5 changed files with 43 additions and 4 deletions

View File

@ -17,8 +17,9 @@ void SpecialPowerupSpawner::OnProximityUpdate(Entity* self, Entity* entering, co
GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true);
SkillComponent* skillComponent;
if (!self->TryGetComponent(eReplicaComponentType::SKILL, skillComponent)) return;
auto skillComponent = self->GetComponent<SkillComponent>();
if (!skillComponent) return;
Game::logger->Log("SpecialPowerupSpawner", "cast skill %i on %llu", this->m_SkillId, entering->GetObjectID());
skillComponent->CastSkill(this->m_SkillId, entering->GetObjectID());
self->SetVar(u"bIsDead", true);