minor code cleanup

Signed-off-by: kberg-amzn <karlberg@amazon.com>
This commit is contained in:
kberg-amzn
2021-09-21 11:56:19 -07:00
parent a3aaebe83e
commit ca7de715fd
3 changed files with 7 additions and 6 deletions
@@ -31,14 +31,10 @@ namespace Multiplayer
AZ_MULTIPLAYER_COMPONENT(Multiplayer::NetworkCharacterComponent, s_networkCharacterComponentConcreteUuid, Multiplayer::NetworkCharacterComponentBase) AZ_MULTIPLAYER_COMPONENT(Multiplayer::NetworkCharacterComponent, s_networkCharacterComponentConcreteUuid, Multiplayer::NetworkCharacterComponentBase)
static void Reflect(AZ::ReflectContext* context); static void Reflect(AZ::ReflectContext* context);
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
NetworkCharacterComponent(); NetworkCharacterComponent();
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("NetworkRigidBodyService"));
}
// AZ::Component // AZ::Component
void OnInit() override {} void OnInit() override {}
void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating) override; void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT * SPDX-License-Identifier: Apache-2.0 OR MIT
* *
*/ */
#pragma once #pragma once
#include <Source/AutoGen/NetworkRigidBodyComponent.AutoComponent.h> #include <Source/AutoGen/NetworkRigidBodyComponent.AutoComponent.h>
@@ -19,7 +19,6 @@
namespace Multiplayer namespace Multiplayer
{ {
bool CollisionLayerBasedControllerFilter(const physx::PxController& controllerA, const physx::PxController& controllerB) bool CollisionLayerBasedControllerFilter(const physx::PxController& controllerA, const physx::PxController& controllerB)
{ {
PHYSX_SCENE_READ_LOCK(controllerA.getActor()->getScene()); PHYSX_SCENE_READ_LOCK(controllerA.getActor()->getScene());
@@ -94,6 +93,11 @@ namespace Multiplayer
NetworkCharacterComponentBase::Reflect(context); NetworkCharacterComponentBase::Reflect(context);
} }
void NetworkCharacterComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("NetworkRigidBodyService"));
}
NetworkCharacterComponent::NetworkCharacterComponent() NetworkCharacterComponent::NetworkCharacterComponent()
: m_translationEventHandler([this](const AZ::Vector3& translation) { OnTranslationChangedEvent(translation); }) : m_translationEventHandler([this](const AZ::Vector3& translation) { OnTranslationChangedEvent(translation); })
{ {