mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
833ed8a40d
Adds the ability for the buccaneer valiant to spawn a ship that rams enemies and smashes them. Next to a script that triggers the ship skill a few other changes had to be made: - Force movement behavior server side calculation and sync - The ship has no physics volume so the FindValidTargets for behaviors had to be altered to allow ControllablePhysics entities to find entities within their area. The "target_self" AOE flag has been used to replicate the old behavior.
32 lines
613 B
C++
32 lines
613 B
C++
#pragma once
|
|
#include "Behavior.h"
|
|
|
|
class AreaOfEffectBehavior final : public Behavior
|
|
{
|
|
public:
|
|
Behavior* m_action;
|
|
|
|
uint32_t m_maxTargets;
|
|
|
|
float m_radius;
|
|
|
|
int32_t m_ignoreFaction;
|
|
|
|
int32_t m_includeFaction;
|
|
|
|
int32_t m_TargetSelf;
|
|
|
|
/*
|
|
* Inherited
|
|
*/
|
|
explicit AreaOfEffectBehavior(const uint32_t behaviorId) : Behavior(behaviorId)
|
|
{
|
|
}
|
|
|
|
void Handle(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) override;
|
|
|
|
void Calculate(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) override;
|
|
|
|
void Load() override;
|
|
};
|