mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
format codebase
This commit is contained in:
@@ -5,21 +5,18 @@
|
||||
#include "EntityManager.h"
|
||||
#include "MovementAIComponent.h"
|
||||
|
||||
void PullToPointBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch)
|
||||
{
|
||||
void PullToPointBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
|
||||
auto* entity = EntityManager::Instance()->GetEntity(context->originator);
|
||||
|
||||
|
||||
auto* target = EntityManager::Instance()->GetEntity(branch.target);
|
||||
|
||||
if (entity == nullptr || target == nullptr)
|
||||
{
|
||||
if (entity == nullptr || target == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
auto* movement = target->GetComponent<MovementAIComponent>();
|
||||
|
||||
if (movement == nullptr)
|
||||
{
|
||||
if (movement == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,11 +25,9 @@ void PullToPointBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi
|
||||
movement->PullToPoint(position);
|
||||
}
|
||||
|
||||
void PullToPointBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch)
|
||||
{
|
||||
void PullToPointBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
|
||||
Handle(context, bitStream, branch);
|
||||
}
|
||||
|
||||
void PullToPointBehavior::Load()
|
||||
{
|
||||
void PullToPointBehavior::Load() {
|
||||
}
|
||||
|
Reference in New Issue
Block a user