mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 19:03:43 +00:00
L_TURRET (LOTs 12286 and 13093, e.g. the Crux Prime auto turrets) had no script, so these turrets could be stunned, knocked back and pulled. They now push the same immunities the live script does. Check: stun and knock back a Crux Prime auto turret: nothing happens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
753 B
C++
17 lines
753 B
C++
#include "ImmovableTurret.h"
|
|
|
|
#include "ControllablePhysicsComponent.h"
|
|
#include "DestroyableComponent.h"
|
|
#include "Entity.h"
|
|
#include "eStateChangeType.h"
|
|
|
|
void ImmovableTurret::OnStartup(Entity* self) {
|
|
// SetStunImmunity (attack, interrupt) and SetStatusImmunity (pull to point, knockback); DLU keeps interrupt with the status ones
|
|
if (auto* controllablePhysics = self->GetComponent<ControllablePhysicsComponent>()) {
|
|
controllablePhysics->SetStunImmunity(eStateChangeType::PUSH, self->GetObjectID(), true, false, false, false, false, false, false);
|
|
}
|
|
if (auto* destroyable = self->GetComponent<DestroyableComponent>()) {
|
|
destroyable->SetStatusImmunity(eStateChangeType::PUSH, false, false, true, true, false, false, false, false, true);
|
|
}
|
|
}
|