浏览代码

Made CharacterComponent incompatible with network rigid body component

Signed-off-by: pereslav <[email protected]>
pereslav 4 年之前
父节点
当前提交
fdcfc962cf

+ 5 - 0
Gem/Code/Source/Components/CharacterComponent.h

@@ -31,6 +31,11 @@ namespace MultiplayerSample
 
 
         CharacterComponent();
         CharacterComponent();
 
 
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+        {
+            incompatible.push_back(AZ_CRC_CE("NetworkRigidBodyService"));
+        }
+
         void OnInit() override;
         void OnInit() override;
         void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
         void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
         void OnDeactivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
         void OnDeactivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;

+ 5 - 0
Gem/Code/Source/Components/NetworkRigidBodyComponent.h

@@ -35,6 +35,11 @@ namespace MultiplayerSample
 
 
         NetworkRigidBodyComponent();
         NetworkRigidBodyComponent();
 
 
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+        {
+            provided.push_back(AZ_CRC_CE("NetworkRigidBodyService"));
+        }
+
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
         {
         {
             required.push_back(AZ_CRC_CE("PhysXRigidBodyService"));
             required.push_back(AZ_CRC_CE("PhysXRigidBodyService"));