fix: multiple progression for shark mission (#1769)

tested that mission progresses once and only once per death
This commit is contained in:
David Markowitz 2025-04-19 05:37:08 -07:00 committed by GitHub
parent 6f94043b33
commit 1fb1da101c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,9 +9,10 @@ void ActSharkPlayerDeathTrigger::OnFireEventServerSide(Entity* self, Entity* sen
auto missionComponent = sender->GetComponent<MissionComponent>();
if (!missionComponent) return;
missionComponent->Progress(eMissionTaskType::SCRIPT, 8419);
// This check is only needed because dlu doesnt have proper collision checks on rotated phantom physics
if (sender->GetIsDead() || !sender->GetPlayerReadyForUpdates()) return; //Don't kill already dead players or players not ready
missionComponent->Progress(eMissionTaskType::SCRIPT, 8419);
if (sender->GetCharacter()) {
sender->Smash(self->GetObjectID(), eKillType::VIOLENT, u"big-shark-death");