mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 09:48:20 +00:00
6aa90ad5b2
* Breakout rest of the enums from dcommonvars so we don't have to deal with merge conflicts ePlayerFlags is not a scoped enum, yet, due to it's complexity * address feedback * make player flag types consistent * fix typo
21 lines
658 B
C++
21 lines
658 B
C++
#include "StunImmunity.h"
|
|
#include "DestroyableComponent.h"
|
|
#include "ControllablePhysicsComponent.h"
|
|
#include "eStateChangeType.h"
|
|
|
|
void StunImmunity::OnStartup(Entity* self) {
|
|
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
|
|
if (destroyableComponent) {
|
|
destroyableComponent->SetStatusImmunity(
|
|
eStateChangeType::PUSH, false, false, true, true, false, false, false, false, true
|
|
);
|
|
}
|
|
|
|
auto* controllablePhysicsComponent = self->GetComponent<ControllablePhysicsComponent>();
|
|
if (controllablePhysicsComponent) {
|
|
controllablePhysicsComponent->SetStunImmunity(
|
|
eStateChangeType::PUSH, self->GetObjectID(), true
|
|
);
|
|
}
|
|
}
|