mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 23:08:31 +00:00
move IsDead to the DestroyableComponent
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "ActSharkPlayerDeathTrigger.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
#include "Entity.h"
|
||||
@@ -11,7 +12,7 @@ void ActSharkPlayerDeathTrigger::OnFireEventServerSide(Entity* self, Entity* sen
|
||||
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, 8419);
|
||||
|
||||
if (sender->GetIsDead() || !sender->GetPlayerReadyForUpdates()) return; //Don't kill already dead players or players not ready
|
||||
if (sender->GetComponent<DestroyableComponent>()->GetIsDead() || !sender->GetPlayerReadyForUpdates()) return; //Don't kill already dead players or players not ready
|
||||
|
||||
if (sender->GetCharacter()) {
|
||||
sender->Smash(self->GetObjectID(), eKillType::VIOLENT, u"big-shark-death");
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#include "AgShipPlayerDeathTrigger.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void AgShipPlayerDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
if (target->GetLOT() == 1 && !target->GetIsDead()) {
|
||||
if (target->GetLOT() == 1 && !target->GetComponent<DestroyableComponent>()->GetIsDead()) {
|
||||
target->Smash(self->GetObjectID(), eKillType::VIOLENT, u"electro-shock-death");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user