mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Fix shark stinky fish death animation (#1004)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "StinkyFishTarget.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void StinkyFishTarget::OnStartup(Entity* self) {
|
||||
auto position = self->GetPosition();
|
||||
@ -16,6 +17,7 @@ void StinkyFishTarget::OnSkillEventFired(Entity* self, Entity* caster, const std
|
||||
self->SetVar<LWOOBJID>(u"player", caster->GetObjectID());
|
||||
|
||||
EntityInfo entityInfo{};
|
||||
entityInfo.lot = SHARK_LOT;
|
||||
entityInfo.pos = self->GetPosition();
|
||||
entityInfo.rot = self->GetRotation();
|
||||
entityInfo.spawnerID = self->GetObjectID();
|
||||
@ -35,7 +37,7 @@ void StinkyFishTarget::OnTimerDone(Entity* self, std::string timerName) {
|
||||
const auto playerID = self->GetVar<LWOOBJID>(u"player");
|
||||
auto* fish = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"fish"));
|
||||
|
||||
if (fish != nullptr) {
|
||||
if (fish) {
|
||||
fish->Smash(playerID);
|
||||
self->Smash(playerID);
|
||||
}
|
||||
|
Reference in New Issue
Block a user