Compare commits

...

16 Commits

Author SHA1 Message Date
Tleety c7099de9e4 Merge remote-tracking branch 'origin/master' into ScoreBoard
# Conflicts:
#	assets
2016-03-07 10:58:55 +01:00
Tleety cb9dad5c67 Merge remote-tracking branch 'origin/master' into ScoreBoard 2016-03-07 10:49:57 +01:00
Tleety a8f2d0a8e6 Some assets, some fixes to the scoreboard 2016-03-07 10:48:46 +01:00
Jace b7a7f7fd5e ???? 2016-03-04 15:02:01 +01:00
Jace 434ff1e7eb ???? 2016-03-04 10:06:49 +01:00
Jace e58b5ffd6f Merge remote-tracking branch 'origin/Movement' into Weapons
# Conflicts:
#	resources/Schema/Entities/Player.xml
#	src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp
2016-03-04 09:43:34 +01:00
Jace 4557455e49 HUD stuff 2016-03-04 09:41:12 +01:00
viktorljung c1f5cf65a7 Movement animations 2016-03-04 09:39:16 +01:00
Jace a8ad85b004 Merge remote-tracking branch 'origin/IconsForPlaytest' into Weapons 2016-03-04 09:39:11 +01:00
Jace 3ac8a5c7ef Working map 2016-03-04 09:38:38 +01:00
Jace ebd4c58c41 "Fixed" weapon spawning over network 2016-03-04 09:23:18 +01:00
Jace 42cccfbac0 Merge branch 'Weapons' of github.com:teamfisk/TacticalZ into Weapons
# Conflicts:
#	assets
#	src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp
2016-03-04 08:56:58 +01:00
Jocke e2674d915e Constrained weapon behavior to client side only 2016-03-04 08:55:55 +01:00
Jace 2b55450c18 Cray cray weapons 2016-03-04 08:54:59 +01:00
viktorljung 7ba0e4ea9d Run, Strafe and jump animations now playing 2016-03-04 08:35:02 +01:00
Jocke d78a7e20e2 Merge branch 'master' into Weapons 2016-03-04 08:29:33 +01:00
33 changed files with 9708 additions and 5772 deletions
+1 -1
Submodule assets updated: d3be164b69...0ae736570b
@@ -12,8 +12,8 @@ template <typename EventContext>
class EditorCameraInputController : public FirstPersonInputController<EventContext> class EditorCameraInputController : public FirstPersonInputController<EventContext>
{ {
public: public:
EditorCameraInputController(EventBroker* eventBroker, unsigned int playerID) EditorCameraInputController(EventBroker* eventBroker, unsigned int playerID, EntityWrapper playerEntity)
: FirstPersonInputController(eventBroker, playerID) : FirstPersonInputController(eventBroker, playerID, playerEntity)
{ {
EVENT_SUBSCRIBE_MEMBER(m_EMousePress, &EditorCameraInputController::OnMousePress); EVENT_SUBSCRIBE_MEMBER(m_EMousePress, &EditorCameraInputController::OnMousePress);
EVENT_SUBSCRIBE_MEMBER(m_EMouseRelease, &EditorCameraInputController::OnMouseRelease); EVENT_SUBSCRIBE_MEMBER(m_EMouseRelease, &EditorCameraInputController::OnMouseRelease);
@@ -6,12 +6,13 @@
#include "../Core/ELockMouse.h" #include "../Core/ELockMouse.h"
#include "../Game/Events/EDashAbility.h" #include "../Game/Events/EDashAbility.h"
#include "InputHandler.h" #include "InputHandler.h"
#include "Rendering/EAutoAnimationBlend.h"
template <typename EventContext> template <typename EventContext>
class FirstPersonInputController : public InputController<EventContext> class FirstPersonInputController : public InputController<EventContext>
{ {
public: public:
FirstPersonInputController(EventBroker* eventBroker, int playerID); FirstPersonInputController(EventBroker* eventBroker, int playerID, EntityWrapper playerEntity);
virtual const glm::vec3 Movement() const { return m_Movement; } virtual const glm::vec3 Movement() const { return m_Movement; }
virtual const glm::vec3 Rotation() const { return m_Rotation; } virtual const glm::vec3 Rotation() const { return m_Rotation; }
@@ -34,6 +35,8 @@ public:
protected: protected:
const int m_PlayerID; const int m_PlayerID;
EntityWrapper m_PlayerEntity;
bool m_MouseLocked = false; bool m_MouseLocked = false;
glm::vec3 m_Rotation; glm::vec3 m_Rotation;
glm::vec3 m_Movement; glm::vec3 m_Movement;
@@ -65,9 +68,10 @@ protected:
}; };
template <typename EventContext> template <typename EventContext>
FirstPersonInputController<EventContext>::FirstPersonInputController(EventBroker* eventBroker, int playerID) FirstPersonInputController<EventContext>::FirstPersonInputController(EventBroker* eventBroker, int playerID, EntityWrapper playerEntity)
: InputController(eventBroker) : InputController(eventBroker)
, m_PlayerID(playerID) , m_PlayerID(playerID)
, m_PlayerEntity(playerEntity)
{ {
EVENT_SUBSCRIBE_MEMBER(m_ELockMouse, &FirstPersonInputController::OnLockMouse); EVENT_SUBSCRIBE_MEMBER(m_ELockMouse, &FirstPersonInputController::OnLockMouse);
EVENT_SUBSCRIBE_MEMBER(m_EUnlockMouse, &FirstPersonInputController::OnUnlockMouse); EVENT_SUBSCRIBE_MEMBER(m_EUnlockMouse, &FirstPersonInputController::OnUnlockMouse);
@@ -118,13 +122,84 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (e.Command == "Forward") { if (e.Command == "Forward") {
float val = glm::clamp(e.Value, -1.f, 1.f); float val = glm::clamp(e.Value, -1.f, 1.f);
m_Movement.z = -val; m_Movement.z = -val;
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
if (val > 0) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
if(m_Crouching) {
aeb.NodeName = "Walk";
} else {
aeb.NodeName = "Run";
}
aeb.RootNode = playerModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
} else if (val < 0) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
if (m_Crouching) {
aeb.NodeName = "Walk";
} else {
aeb.NodeName = "Run";
}
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Reverse = true;
m_EventBroker->Publish(aeb);
} else {
}
}
}
} }
if (e.Command == "Right") { if (e.Command == "Right") {
float val = glm::clamp(e.Value, -1.f, 1.f); float val = glm::clamp(e.Value, -1.f, 1.f);
m_Movement.x = val; m_Movement.x = val;
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
if (val > 0) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Right";
aeb.RootNode = playerModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
} else if (val < 0) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Left";
aeb.RootNode = playerModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
} else {
}
}
}
} }
if (glm::length2(m_Movement) > 0) { if (glm::length2(m_Movement) > 0) {
m_Movement = glm::normalize(m_Movement); m_Movement = glm::normalize(m_Movement);
} else {
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Idle";
aeb.RootNode = playerModel;
m_EventBroker->Publish(aeb);
}
}
} }
} }
@@ -159,6 +234,32 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (e.Command == "Crouch") { if (e.Command == "Crouch") {
m_Crouching = e.Value > 0; m_Crouching = e.Value > 0;
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
if (e.Value == 0.f) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "StandMovement";
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Restart = true;
aeb.SingleLevelBlend = true;
m_EventBroker->Publish(aeb);
} else if(e.Value == 1.0f) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "CrouchMovement";
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Restart = true;
aeb.SingleLevelBlend = true;
m_EventBroker->Publish(aeb);
}
}
}
} }
if (e.Command == "SpecialAbility") { if (e.Command == "SpecialAbility") {
+1 -1
View File
@@ -52,7 +52,7 @@ public:
void Connect(std::string address, int port); void Connect(std::string address, int port);
void Update() override; void Update() override;
private: private:
UDPClient m_Unreliable; //UDPClient m_Unreliable;
TCPClient m_Reliable; TCPClient m_Reliable;
std::vector<Events::PlayerSpawned> m_PlayerSpawnEvents; std::vector<Events::PlayerSpawned> m_PlayerSpawnEvents;
void parseSpawnEvents(); void parseSpawnEvents();
+1 -1
View File
@@ -36,7 +36,7 @@ public:
private: private:
// Network channels // Network channels
TCPServer m_Reliable; TCPServer m_Reliable;
UDPServer m_Unreliable; //UDPServer m_Unreliable;
UDPServer m_ServerlistRequest; UDPServer m_ServerlistRequest;
// dont forget to set these in the childrens receive logic // dont forget to set these in the childrens receive logic
boost::asio::ip::address m_Address; boost::asio::ip::address m_Address;
+1
View File
@@ -62,6 +62,7 @@ public:
double progress; double progress;
bool Start; bool Start;
bool SingleBlend; bool SingleBlend;
double Weight;
std::unordered_map<EntityWrapper, double> StartWeights; std::unordered_map<EntityWrapper, double> StartWeights;
}; };
@@ -19,6 +19,8 @@ struct AutoAnimationBlend : Event
bool Restart = false; bool Restart = false;
bool SingleLevelBlend = false; bool SingleLevelBlend = false;
double Weight = -1.0;
EntityWrapper AnimationEntity = EntityWrapper::Invalid; EntityWrapper AnimationEntity = EntityWrapper::Invalid;
}; };
+50 -3
View File
@@ -9,6 +9,7 @@
#include "Systems/SpawnerSystem.h" #include "Systems/SpawnerSystem.h"
#include "Rendering/ESetCamera.h" #include "Rendering/ESetCamera.h"
#include "Core/ConfigFile.h" #include "Core/ConfigFile.h"
#include "Rendering/EAutoAnimationBlend.h"
template <typename ETYPE> template <typename ETYPE>
class WeaponBehaviour : public PureSystem class WeaponBehaviour : public PureSystem
@@ -31,6 +32,21 @@ public:
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override
{ {
EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon");
EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon");
if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) {
if (m_ActiveWeapons.count(entity) == 0) {
WeaponInfo& wi = m_ActiveWeapons[entity];
wi.Player = entity;
wi.WeaponEntity = entity;
wi.FirstPersonEntity = firstPersonWeapon;
wi.ThirdPersonEntity = thirdPersonWeapon;
OnEquip(cWeapon, wi);
}
}
auto weapon = getActiveWeapon(entity); auto weapon = getActiveWeapon(entity);
if (!weapon) { if (!weapon) {
return; return;
@@ -94,6 +110,31 @@ protected:
} }
} }
void playAnimation(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
{
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model");
if (!root.Valid()) {
return;
}
EntityWrapper subTree = root.FirstChildByName(subTreeName);
if (!subTree.Valid()) {
return;
}
EntityWrapper animationNode = subTree.FirstChildByName(animationNodeName);
if (!animationNode.Valid()) {
return;
}
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = root;
eFireBlend.NodeName = animationNodeName;
eFireBlend.Restart = true;
eFireBlend.Start = true;
m_EventBroker->Publish(eFireBlend);
}
void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName) void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
{ {
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model"); EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model");
@@ -213,6 +254,10 @@ private:
void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player) void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player)
{ {
if (!IsServer) {
return;
}
// Don't reselect weapon if it's already active // Don't reselect weapon if it's already active
if (getActiveWeapon(player)) { if (getActiveWeapon(player)) {
return; return;
@@ -242,9 +287,11 @@ private:
// Spawn the weapon(s) // Spawn the weapon(s)
EntityWrapper firstPersonWeapon; EntityWrapper firstPersonWeapon;
EntityWrapper thirdPersonWeapon; EntityWrapper thirdPersonWeapon;
if (firstPersonAttachment.Valid()) { //if (IsClient) {
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment); if (firstPersonAttachment.Valid()) {
} firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
}
//}
if (thirdPersonAttachment.Valid()) { if (thirdPersonAttachment.Valid()) {
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment); thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
} }
File diff suppressed because it is too large Load Diff
+21 -21
View File
@@ -2,36 +2,36 @@
<Entity name="Shield" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="Shield" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:Blend>
<Pose1>Deploy</Pose1>
<Pose2>Idle</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Model>
<Resource>Models/Characters/Defender/DefenderShield.mesh</Resource>
</c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="Shield"> <Entity name="Deploy">
<Components> <Components>
<c:Model> <c:Animation>
<Resource>Models/Core/UnitPlane.mesh</Resource> <AnimationName>ActivateDeactiveShieldF</AnimationName>
</c:Model> <Time>1</Time>
<c:Shield/> <Speed>1</Speed>
<c:Transform> </c:Animation>
<Scale X="1.11800003" Y="0.0320000015" Z="1.9180001"/> <c:Transform/>
<Orientation X="-1.57079995" Y="0" Z="0"/>
</c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="VisibleSide"> <Entity name="Idle">
<Components> <Components>
<c:Shielded/> <c:Animation>
<c:Model> <AnimationName>ShieldFrontF</AnimationName>
<Resource>Models/Core/UnitHexagon.mesh</Resource> <Speed>1</Speed>
<Color A="0" B="1" G="0" R="0"/> </c:Animation>
<Transparent>true</Transparent> <c:Transform/>
</c:Model>
<c:Transform>
<Position X="0" Y="0" Z="0.0179871861"/>
<Scale X="1.01900005" Y="0.0120000001" Z="1.91000009"/>
<Orientation X="-1.57079995" Y="0" Z="0"/>
</c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
+2 -2
View File
@@ -15,7 +15,7 @@
</c:Team> </c:Team>
<c:PlayerSpawn/> <c:PlayerSpawn/>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/PlayerAssaultFallbackRed.xml</EntityFile> <EntityFile>Schema/Entities/PlayerDefenderBlue.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.300000012" Y="0.0270000007" Z="0"/> <Position X="0.300000012" Y="0.0270000007" Z="0"/>
@@ -83,7 +83,7 @@
</c:Team> </c:Team>
<c:PlayerSpawn/> <c:PlayerSpawn/>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile> <EntityFile>Schema/Entities/PlayerAssaultBlue.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.300000012" Y="0.0270000007" Z="6.67400026"/> <Position X="0.300000012" Y="0.0270000007" Z="6.67400026"/>
File diff suppressed because it is too large Load Diff
+60 -82
View File
@@ -484,10 +484,12 @@
</Entity> </Entity>
<Entity name="Hands"> <Entity name="Hands">
<Components> <Components>
<c:BlendAdditive> <c:Blend>
<Adder>Run</Adder> <Pose1>BlendTreeAssaultWeapon</Pose1>
<Receiver>FinalBlend</Receiver> <Pose2>BlendTreeSecondaryWeapon</Pose2>
</c:BlendAdditive> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Model> <c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource> <Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model> </c:Model>
@@ -506,8 +508,8 @@
<EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile> <EntityFile>Schema/Entities/WeaponAssaultBlueView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.120525226" Y="-0.23723805" Z="-0.18130067"/> <Position X="0.120430678" Y="-0.228860483" Z="-0.181454629"/>
<Orientation X="-0.00823593792" Y="-0.00347058685" Z="0.0434750468"/> <Orientation X="0.0104048448" Y="-0.00268179015" Z="0.0428442247"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -524,73 +526,50 @@
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile> <EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.120525226" Y="-0.23723805" Z="-0.18130067"/> <Position X="0.120430678" Y="-0.228860483" Z="-0.181454629"/>
<Orientation X="-0.00823593792" Y="-0.00347058685" Z="0.0434750468"/> <Orientation X="0.0104048448" Y="-0.00268179015" Z="0.0428442247"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="FinalBlend"> <Entity name="BlendTreeAssaultWeapon">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>BlendTreeAssaultWeapon</Pose1> <Pose1>Idle</Pose1>
<Pose2>BlendTreeSecondaryWeapon</Pose2> <Pose2>WeaponAction</Pose2>
<Weight>0</Weight> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot> <SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="BlendTreeAssaultWeapon"> <Entity name="WeaponAction">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>Idle</Pose1> <Pose1>Fire</Pose1>
<Pose2>WeaponAction</Pose2> <Pose2>Reload</Pose2>
<Weight>0</Weight> <Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="WeaponAction"> <Entity name="Fire">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleF</AnimationName> <AnimationName>ShootShotgunF</AnimationName>
<Time>0.97212039472333345</Time> <Speed>1</Speed>
<Play>true</Play>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Time>0.58991607886241582</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -600,22 +579,22 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="BlendTreeSecondaryWeapon"> <Entity name="Idle">
<Components> <Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.14837891922093149</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Run"> <Entity name="BlendTreeSecondaryWeapon">
<Components> <Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.51068473950665805</Time>
<Speed>1</Speed>
<Additive>true</Additive>
</c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
@@ -652,7 +631,6 @@
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource> <Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Color A="1" B="1" G="0.952941179" R="1"/> <Color A="1" B="1" G="0.952941179" R="1"/>
<Visible>false</Visible>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -672,8 +650,8 @@
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile> <EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.157275528" Y="1.04134643" Z="-0.233016849"/> <Position X="0.156692833" Y="1.04078996" Z="-0.230734348"/>
<Orientation X="-0.00424382696" Y="-0.0348230973" Z="0.137522101"/> <Orientation X="-0.00423099846" Y="-0.0376685001" Z="0.137512475"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -693,8 +671,8 @@
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile> <EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.157275528" Y="1.04134643" Z="-0.233016849"/> <Position X="0.156692833" Y="1.04078996" Z="-0.230734348"/>
<Orientation X="-0.00424382696" Y="-0.0348230973" Z="0.137522101"/> <Orientation X="-0.00423099846" Y="-0.0376685001" Z="0.137512475"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -740,12 +718,12 @@
<Components> <Components>
<c:BlendOverride> <c:BlendOverride>
<Master>ReloadSwitchBlend</Master> <Master>ReloadSwitchBlend</Master>
<Slave>MovementBlend</Slave> <Slave>FinalMovementBlend</Slave>
</c:BlendOverride> </c:BlendOverride>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="MovementBlend"> <Entity name="FinalMovementBlend">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>StandCrouchBlend</Pose1> <Pose1>StandCrouchBlend</Pose1>
@@ -801,7 +779,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName> <AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.68480018110252416</Time> <Time>0.86105870560012221</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -813,7 +791,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName> <AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.61212164305330674</Time> <Time>0.78838016755090479</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -827,7 +805,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchWalkF</AnimationName> <AnimationName>CrouchWalkF</AnimationName>
<Time>0.39049562823070971</Time> <Time>0.56675415272830776</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -884,7 +862,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>WalkF</AnimationName> <AnimationName>WalkF</AnimationName>
<Time>0.89565025764048301</Time> <Time>0.071908782138081051</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -896,7 +874,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>RunF</AnimationName> <AnimationName>RunF</AnimationName>
<Time>0.1676637616643859</Time> <Time>0.34392228616198395</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -920,7 +898,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>StrafeRightF</AnimationName> <AnimationName>StrafeRightF</AnimationName>
<Time>0.10075840855413531</Time> <Time>0.27701693305173336</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -932,7 +910,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>StrafeLeftF</AnimationName> <AnimationName>StrafeLeftF</AnimationName>
<Time>0.077242878674020687</Time> <Time>0.25350140317161873</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -948,7 +926,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleF</AnimationName> <AnimationName>IdleF</AnimationName>
<Time>0.027866837470497785</Time> <Time>0.07079692416292005</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -1008,7 +986,7 @@
<c:Animation> <c:Animation>
<AnimationName>DashForwardF</AnimationName> <AnimationName>DashForwardF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>1</Speed> <Speed>2</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1020,7 +998,7 @@
<c:Animation> <c:Animation>
<AnimationName>DashBackwardF</AnimationName> <AnimationName>DashBackwardF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>1</Speed> <Speed>2</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1044,7 +1022,7 @@
<c:Animation> <c:Animation>
<AnimationName>DashLeftF</AnimationName> <AnimationName>DashLeftF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>1</Speed> <Speed>2</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1056,7 +1034,7 @@
<c:Animation> <c:Animation>
<AnimationName>DashRightF</AnimationName> <AnimationName>DashRightF</AnimationName>
<Time>1</Time> <Time>1</Time>
<Speed>1</Speed> <Speed>2</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -1117,7 +1095,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName> <AnimationName>IdleAssaultRifleU</AnimationName>
<Time>0.31987294268299138</Time> <Time>1.4961314671805894</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -1129,7 +1107,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleSecWepU</AnimationName> <AnimationName>IdleSecWepU</AnimationName>
<Time>0.32339798297277866</Time> <Time>1.4996565074703767</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+228 -106
View File
@@ -1,31 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Player" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="PlayerDefender" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:AABB> <c:AABB>
<Origin X="0" Y="0.772000015" Z="0"/> <Origin X="0" Y="0.772000015" Z="0"/>
<Size X="1" Y="1.60000002" Z="1"/> <Size X="1" Y="1.60000002" Z="1"/>
</c:AABB> </c:AABB>
<c:AssaultWeapon/>
<c:Team> <c:Team>
<Team> <Team>
<Blue/> <Red/>
</Team> </Team>
</c:Team> </c:Team>
<c:Collidable/> <c:Collidable/>
<c:DashAbility/> <c:DefenderWeapon>
<c:DefenderWeapon/> <MagazineAmmo>4</MagazineAmmo>
<c:DoubleJump/> <Ammo>52</Ammo>
<c:Health/> </c:DefenderWeapon>
<c:Listener/>
<c:Health>
<Health>150</Health>
<MaxHealth>150</MaxHealth>
</c:Health>
<c:ShieldAbility/>
<c:Physics> <c:Physics>
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/> <Velocity X="-1.86527334e-13" Y="0" Z="1.89149233e-13"/>
<IsOnGround>true</IsOnGround>
</c:Physics> </c:Physics>
<c:Player> <c:Player>
<MovementSpeed>5</MovementSpeed> <MovementSpeed>5</MovementSpeed>
<CurrentWeapon></CurrentWeapon> <CurrentWeapon></CurrentWeapon>
</c:Player> </c:Player>
<c:Transform> <c:Transform>
<Position X="0" Y="0.0288832188" Z="2.64144421"/> <Position X="0.67159152" Y="0.0288829375" Z="1.22672582"/>
<Orientation X="0" Y="-0.00174739491" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
@@ -38,6 +45,7 @@
</c:Camera> </c:Camera>
<c:Transform> <c:Transform>
<Position X="0" Y="1.27700007" Z="0"/> <Position X="0" Y="1.27700007" Z="0"/>
<Orientation X="1.11789882" Y="0" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -213,7 +221,7 @@
<Color A="1" B="1" G="0" R="0"/> <Color A="1" B="1" G="0" R="0"/>
</c:Fill> </c:Fill>
<c:Text> <c:Text>
<Content>100/100</Content> <Content>150/150</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource> <Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="0.505882382" B="3.92156863" G="1.17647064" R="0"/> <Color A="0.505882382" B="3.92156863" G="1.17647064" R="0"/>
</c:Text> </c:Text>
@@ -422,6 +430,7 @@
<c:Text> <c:Text>
<Content></Content> <Content></Content>
<Resource>Fonts/DroidSans.ttf,64</Resource> <Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="0.800000012" B="1" G="0.200000003" R="0"/>
<Alignment> <Alignment>
<Right/> <Right/>
</Alignment> </Alignment>
@@ -485,12 +494,10 @@
</Entity> </Entity>
<Entity name="Hands"> <Entity name="Hands">
<Components> <Components>
<c:Blend> <c:BlendAdditive>
<Pose1>BlendTreeAssaultWeapon</Pose1> <Adder>MovementBlend</Adder>
<Pose2>BlendTreeSecondaryWeapon</Pose2> <Receiver>FinalBlend</Receiver>
<Weight>0</Weight> </c:BlendAdditive>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Model> <c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource> <Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model> </c:Model>
@@ -501,7 +508,6 @@
<Components> <Components>
<c:BoneAttachment> <c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName> <BoneName>R_Arm_Weapon_Joint</BoneName>
<InheritScale>true</InheritScale>
</c:BoneAttachment> </c:BoneAttachment>
<c:WeaponAttachment> <c:WeaponAttachment>
<Weapon>DefenderWeapon</Weapon> <Weapon>DefenderWeapon</Weapon>
@@ -510,9 +516,8 @@
<EntityFile>Schema/Entities/WeaponDefenderBlueView.xml</EntityFile> <EntityFile>Schema/Entities/WeaponDefenderBlueView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.120430484" Y="-0.233500004" Z="-0.181454703"/> <Position X="0.120748252" Y="-0.228768602" Z="-0.181454718"/>
<Orientation X="0.0104045747" Y="-0.00268182321" Z="0.0428442061"/> <Orientation X="0.0104048951" Y="-0.00268237269" Z="0.0428444892"/>
<Scale X="1.00000012" Y="1.00000024" Z="1.00000012"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -529,38 +534,39 @@
<EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile> <EntityFile>Schema/Entities/SidearmWeaponView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.120430484" Y="-0.233500004" Z="-0.181454703"/> <Position X="0.120748252" Y="-0.228768602" Z="-0.181454718"/>
<Orientation X="0.0104045747" Y="-0.00268182321" Z="0.0428442061"/> <Orientation X="0.0104048951" Y="-0.00268237269" Z="0.0428444892"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="BlendTreeAssaultWeapon"> <Entity name="FinalBlend">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>Idle</Pose1> <Pose1>BlendTreeDefenderWeapon</Pose1>
<Pose2>WeaponAction</Pose2> <Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot> <SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="WeaponAction"> <Entity name="BlendTreeDefenderWeapon">
<Components> <Components>
<c:Blend> <c:Blend>
<Pose1>Fire</Pose1> <Pose1>ActionBlend</Pose1>
<Pose2>Reload</Pose2> <Pose2>Shield</Pose2>
<Weight>1</Weight> <Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="Fire"> <Entity name="Shield">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ShootShotgunF</AnimationName> <AnimationName>ActivateDeactiveShieldF</AnimationName>
<Time>0.5</Time> <Time>1</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
@@ -568,39 +574,112 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="Reload"> <Entity name="ActionBlend">
<Components> <Components>
<c:Animation> <c:Blend>
<AnimationName>ReloadSwitchF</AnimationName> <Pose1>Idle</Pose1>
<Time>0.080754529576125833</Time> <Pose2>ActionBlend2</Pose2>
<Speed>1</Speed> <Weight>0</Weight>
<Play>true</Play> <SubTreeRoot>true</SubTreeRoot>
</c:Animation> </c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend2">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Time>0.5</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadTwoF</AnimationName>
<Time>0.23333333432674408</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Idle"> <Entity name="BlendTreeSecondaryWeapon">
<Components> <Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.63921736993464151</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="BlendTreeSecondaryWeapon"> <Entity name="MovementBlend">
<Components> <Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.93061516164344571</Time>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.11396167157691739</Time>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
@@ -632,9 +711,8 @@
<c:Shielded/> <c:Shielded/>
<c:HiddenForLocalPlayer/> <c:HiddenForLocalPlayer/>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource> <Resource>Models/Characters/Defender/DefenderBlue.mesh</Resource>
<Color A="1" B="1" G="0.952941179" R="1"/> <Color A="1" B="0" G="0" R="1"/>
<Visible>false</Visible>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -651,11 +729,11 @@
</Person> </Person>
</c:WeaponAttachment> </c:WeaponAttachment>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile> <EntityFile>Schema/Entities/WeaponDefenderBlueWorld.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.167930618" Y="1.0368073" Z="-0.219703838"/> <Position X="0.157449082" Y="1.04085267" Z="-0.234242111"/>
<Orientation X="-0.00422216719" Y="-0.0830619708" Z="0.137322947"/> <Orientation X="-0.0042401799" Y="-0.0355410911" Z="0.137519509"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -675,8 +753,8 @@
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile> <EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.167930618" Y="1.0368073" Z="-0.219703838"/> <Position X="0.157449082" Y="1.04085267" Z="-0.234242111"/>
<Orientation X="-0.00422216719" Y="-0.0830619708" Z="0.137322947"/> <Orientation X="-0.0042401799" Y="-0.0355410911" Z="0.137519509"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -779,11 +857,11 @@
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="Left"> <Entity name="Right">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName> <AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.35189715631383223</Time> <Time>0.73997265048741045</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -791,11 +869,11 @@
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="Right"> <Entity name="Left">
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName> <AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.2792186182646148</Time> <Time>0.81265118853662788</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -809,7 +887,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchWalkF</AnimationName> <AnimationName>CrouchWalkF</AnimationName>
<Time>0.057592603442017776</Time> <Time>0.51834663566481343</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -852,42 +930,6 @@
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="RunWalkBlend">
<Components>
<c:Blend>
<Pose1>Walk</Pose1>
<Pose2>Run</Pose2>
<Weight>1.2938206818383024e-24</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Walk">
<Components>
<c:Animation>
<AnimationName>WalkF</AnimationName>
<Time>0.56274723285179107</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.83476073687569396</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="StrafeLRBlend"> <Entity name="StrafeLRBlend">
<Components> <Components>
<c:Blend> <c:Blend>
@@ -902,7 +944,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>StrafeRightF</AnimationName> <AnimationName>StrafeRightF</AnimationName>
<Time>0.76785538376544338</Time> <Time>0.22860941598823903</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -914,7 +956,43 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>StrafeLeftF</AnimationName> <AnimationName>StrafeLeftF</AnimationName>
<Time>0.74433985388532875</Time> <Time>0.2050938861081244</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="RunWalkBlend">
<Components>
<c:Blend>
<Pose1>Walk</Pose1>
<Pose2>Run</Pose2>
<Weight>1.2938206818383024e-24</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Walk">
<Components>
<c:Animation>
<AnimationName>WalkF</AnimationName>
<Time>0.023501265074586719</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.29551476909848962</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -930,7 +1008,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleF</AnimationName> <AnimationName>IdleF</AnimationName>
<Time>0.67830193028129315</Time> <Time>0.038981432856261655</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -1099,7 +1177,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName> <AnimationName>IdleAssaultRifleU</AnimationName>
<Time>1.9869699178942994</Time> <Time>0.44772395011709509</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -1111,7 +1189,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleSecWepU</AnimationName> <AnimationName>IdleSecWepU</AnimationName>
<Time>1.9904949581840867</Time> <Time>0.45124899040688238</Time>
<Speed>1</Speed> <Speed>1</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -1159,6 +1237,50 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="ShieldSpawner">
<Components>
<c:Transform>
<Position X="0" Y="0.854167223" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="Shield">
<Components>
<c:Blend>
<Pose1>Deploy</Pose1>
<Pose2>Idle</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Model>
<Resource>Models/Characters/Defender/DefenderShield.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="Deploy">
<Components>
<c:Animation>
<AnimationName>ActivateDeactiveShieldF</AnimationName>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>ShieldFrontF</AnimationName>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="AABBStanding"> <Entity name="AABBStanding">
@@ -1191,7 +1313,7 @@
<Entity name="PlayerName"> <Entity name="PlayerName">
<Components> <Components>
<c:Text> <c:Text>
<Content>Insert name here</Content> <Content></Content>
<Resource>Fonts/DroidSans.ttf,100</Resource> <Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/> <Color A="1" B="0" G="1" R="0"/>
</c:Text> </c:Text>
+542
View File
@@ -0,0 +1,542 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="PlayerModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>BlendTreeAim</Adder>
<Receiver>BlendTreeAssault</Receiver>
</c:BlendAdditive>
<c:Shielded/>
<c:HiddenForLocalPlayer/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Color A="1" B="1" G="0.25" R="0"/>
<Visible>false</Visible>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="PrimaryAttachment">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
<Person>
<ThirdPerson/>
</Person>
</c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.165396646" Y="1.14537966" Z="-0.206537575"/>
<Orientation X="0.484640986" Y="-0.00695174001" Z="0.0685098693"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SecondaryAttachment">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:WeaponAttachment>
<Weapon>SidearmWeapon</Weapon>
<Person>
<ThirdPerson/>
</Person>
</c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/SidearmWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.165396646" Y="1.14537966" Z="-0.206537575"/>
<Orientation X="0.484640986" Y="-0.00695174001" Z="0.0685098693"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BlendTreeAim">
<Components>
<c:Blend>
<Pose1>AimPrimary</Pose1>
<Pose2>AimSecondary</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="AimSecondary">
<Components>
<c:Animation>
<AnimationName>AimSecWepA</AnimationName>
<Time>0.71143966913223267</Time>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AimPrimary">
<Components>
<c:Animation>
<AnimationName>AimRifleA</AnimationName>
<Time>0.71143966913223267</Time>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeAssault">
<Components>
<c:BlendOverride>
<Master>ReloadSwitchBlend</Master>
<Slave>FinalMovementBlend</Slave>
</c:BlendOverride>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalMovementBlend">
<Components>
<c:Blend>
<Pose1>StandCrouchBlend</Pose1>
<Pose2>JumpDashBlend</Pose2>
<Weight>2.5146881298480398e-63</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="StandCrouchBlend">
<Components>
<c:Blend>
<Pose1>StandMovement</Pose1>
<Pose2>CrouchMovement</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="CrouchMovement">
<Components>
<c:Blend>
<Pose1>MovementBlend</Pose1>
<Pose2>Idle</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Walk</Pose1>
<Pose2>StrafeLRBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="StrafeLRBlend">
<Components>
<c:Blend>
<Pose1>Left</Pose1>
<Pose2>Right</Pose2>
<Weight>0.033793529385008014</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.93215091236880454</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.85947237431958712</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Walk">
<Components>
<c:Animation>
<AnimationName>CrouchWalkF</AnimationName>
<Time>0.63784635949699009</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>CrouchF</AnimationName>
<Time>0.99862473341677438</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="StandMovement">
<Components>
<c:Blend>
<Pose1>MovementBlend</Pose1>
<Pose2>Idle</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>RunWalkBlend</Pose1>
<Pose2>StrafeLRBlend</Pose2>
<Weight>2.4565650245976452e-16</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="RunWalkBlend">
<Components>
<c:Blend>
<Pose1>Walk</Pose1>
<Pose2>Run</Pose2>
<Weight>1.2938206818383024e-24</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Walk">
<Components>
<c:Animation>
<AnimationName>WalkF</AnimationName>
<Time>0.14300098890676338</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.41501449293066628</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="StrafeLRBlend">
<Components>
<c:Blend>
<Pose1>Left</Pose1>
<Pose2>Right</Pose2>
<Weight>0.033793529385008014</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Left">
<Components>
<c:Animation>
<AnimationName>StrafeLeftF</AnimationName>
<Time>0.32459360994030106</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Right">
<Components>
<c:Animation>
<AnimationName>StrafeRightF</AnimationName>
<Time>0.34810913982041569</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>1.2585556863362655</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="JumpDashBlend">
<Components>
<c:Blend>
<Pose1>Jump</Pose1>
<Pose2>DashBlend</Pose2>
<Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Jump">
<Components>
<c:Animation>
<AnimationName>JumpF</AnimationName>
<Time>0.5</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashBlend">
<Components>
<c:Blend>
<Pose1>DashFBBlend</Pose1>
<Pose2>DashLRBlend</Pose2>
<Weight>0.014621149736541383</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="DashFBBlend">
<Components>
<c:Blend>
<Pose1>DashForward</Pose1>
<Pose2>DashBackward</Pose2>
<Weight>0.014363533804961248</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="DashForward">
<Components>
<c:Animation>
<AnimationName>DashForwardF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashBackward">
<Components>
<c:Animation>
<AnimationName>DashBackwardF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="DashLRBlend">
<Components>
<c:Blend>
<Pose1>DashLeft</Pose1>
<Pose2>DashRight</Pose2>
<Weight>4.3244885367500671e-16</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="DashLeft">
<Components>
<c:Animation>
<AnimationName>DashLeftF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="DashRight">
<Components>
<c:Animation>
<AnimationName>DashRightF</AnimationName>
<Time>1</Time>
<Speed>2</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ReloadSwitchBlend">
<Components>
<c:Blend>
<Pose1>ReloadSwitch</Pose1>
<Pose2>WeaponActionBlend</Pose2>
<Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadSwitch">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchU</AnimationName>
<Time>0.00030848838797092881</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="WeaponActionBlend">
<Components>
<c:Blend>
<Pose1>IdleBlend</Pose1>
<Pose2>ShootBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="IdleBlend">
<Components>
<c:Blend>
<Pose1>IdlePrimary</Pose1>
<Pose2>IdleSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="IdlePrimary">
<Components>
<c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName>
<Time>0.56722367394927176</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="IdleSecondary">
<Components>
<c:Animation>
<AnimationName>IdleSecWepU</AnimationName>
<Time>0.57074871423905904</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ShootBlend">
<Components>
<c:Blend>
<Pose1>ShootPrimary</Pose1>
<Pose2>ShootSecondary</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ShootPrimary">
<Components>
<c:Animation>
<AnimationName>ShootFastRifleU</AnimationName>
<Time>0.12914212153428517</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ShootSecondary">
<Components>
<c:Animation>
<AnimationName>ShootSecWepFastU</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -21,11 +21,11 @@
<Entity name="ScoreBoard_Spectators"> <Entity name="ScoreBoard_Spectators">
<Components> <Components>
<c:ScoreScreen> <c:ScoreScreen>
<Offset X="0" Y="-1" Z="0"/> <Offset X="0" Y="-2" Z="0"/>
</c:ScoreScreen> </c:ScoreScreen>
<c:Team/> <c:Team/>
<c:Transform> <c:Transform>
<Position X="0" Y="-14" Z="1.5"/> <Position X="0" Y="-15.7886772" Z="1.5"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:Transform>
<Position X="-0.0440000035" Y="0.136000007" Z="-0.119000003"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>Player</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ReloadEffect">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ThirdPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -3,11 +3,9 @@
<Components> <Components>
<c:Model> <c:Model>
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource> <Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
</c:Model> </c:Model>
<c:Transform> <c:Transform/>
<Position X="0" Y="0.0350000001" Z="-0.295000017"/>
</c:Transform>
</Components> </Components>
<Children> <Children>
@@ -34,7 +32,7 @@
<Entity name="AmmunitionHUD"> <Entity name="AmmunitionHUD">
<Components> <Components>
<c:Transform> <c:Transform>
<Position X="-0.0490000024" Y="0.0520000011" Z="-0.063000001"/> <Position X="-0.0460000038" Y="0.119000003" Z="-0.162"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/> <Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform> </c:Transform>
</Components> </Components>
@@ -2,17 +2,10 @@
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
<PositionOffset X="0" Y="0.0320000015" Z="-0.165000007"/>
</c:BoneAttachment>
<c:Model> <c:Model>
<Resource>Models/Weapons/Blue/DefenderGunBlue.mesh</Resource> <Resource>Models/Weapons/Blue/DefenderWeaponBlue.mesh</Resource>
</c:Model> </c:Model>
<c:Transform> <c:Transform/>
<Position X="0.162026152" Y="1.05794585" Z="-0.380744517"/>
<Orientation X="-0.0628969446" Y="-0.0509683639" Z="0.118739031"/>
</c:Transform>
</Components> </Components>
<Children> <Children>
+1 -1
View File
@@ -19,7 +19,7 @@ EditorSystem::EditorSystem(SystemParams params, IRenderer* renderer, RenderFrame
m_ActualCamera = m_EditorCamera; m_ActualCamera = m_EditorCamera;
m_EditorWorld->AttachComponent(m_EditorCamera.ID, "Transform"); m_EditorWorld->AttachComponent(m_EditorCamera.ID, "Transform");
m_EditorWorld->AttachComponent(m_EditorCamera.ID, "Camera"); m_EditorWorld->AttachComponent(m_EditorCamera.ID, "Camera");
m_EditorCameraInputController = new EditorCameraInputController<EditorSystem>(m_EventBroker, -1); m_EditorCameraInputController = new EditorCameraInputController<EditorSystem>(m_EventBroker, -1, EntityWrapper::Invalid);
m_EditorGUI = new EditorGUI(m_World, m_EventBroker); m_EditorGUI = new EditorGUI(m_World, m_EventBroker);
m_EditorGUI->SetEntitySelectedCallback(std::bind(&EditorSystem::OnEntitySelected, this, std::placeholders::_1)); m_EditorGUI->SetEntitySelectedCallback(std::bind(&EditorSystem::OnEntitySelected, this, std::placeholders::_1));
+14 -14
View File
@@ -49,16 +49,16 @@ void Client::Connect(std::string address, int port)
void Client::Update() void Client::Update()
{ {
m_EventBroker->Process<Client>(); m_EventBroker->Process<Client>();
while (m_Unreliable.IsSocketAvailable()) { //while (m_Unreliable.IsSocketAvailable()) {
// Packet will get real data in receive // // Packet will get real data in receive
Packet packet(MessageType::Invalid); // Packet packet(MessageType::Invalid);
m_Unreliable.Receive(packet); // m_Unreliable.Receive(packet);
if (packet.GetMessageType() == MessageType::Connect) { // if (packet.GetMessageType() == MessageType::Connect) {
parseUDPConnect(packet); // parseUDPConnect(packet);
} else { // } else {
parseMessageType(packet); // parseMessageType(packet);
} // }
} //}
while (m_Reliable.IsSocketAvailable()) { while (m_Reliable.IsSocketAvailable()) {
// Packet will get real data in receive // Packet will get real data in receive
Packet packet(MessageType::Invalid); Packet packet(MessageType::Invalid);
@@ -177,8 +177,8 @@ void Client::parseTCPConnect(Packet& packet)
Packet UnreliablePacket(MessageType::Connect, m_SendPacketID); Packet UnreliablePacket(MessageType::Connect, m_SendPacketID);
// Add player id and other stuff // Add player id and other stuff
packet.WritePrimitive(m_PlayerID); packet.WritePrimitive(m_PlayerID);
m_Unreliable.Send(packet); // m_Unreliable.Send(packet);
LOG_INFO("Sent UDP Connect Server"); // LOG_INFO("Sent UDP Connect Server");
} }
void Client::parsePlayerConnected(Packet & packet) void Client::parsePlayerConnected(Packet & packet)
@@ -476,7 +476,7 @@ bool Client::OnInputCommand(const Events::InputCommand & e)
if (e.Command == "ConnectToServer") { // Connect for now if (e.Command == "ConnectToServer") { // Connect for now
if (e.Value > 0) { if (e.Value > 0) {
m_Reliable.Connect(m_PlayerName, m_Address, m_Port); m_Reliable.Connect(m_PlayerName, m_Address, m_Port);
m_Unreliable.Connect(m_PlayerName, m_Address, m_Port); // m_Unreliable.Connect(m_PlayerName, m_Address, m_Port);
} }
//LOG_DEBUG("Client::OnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID); //LOG_DEBUG("Client::OnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID);
return true; return true;
@@ -613,7 +613,7 @@ void Client::sendLocalPlayerTransform()
packet.WritePrimitive((int)cAssaultWeapon["Ammo"]); packet.WritePrimitive((int)cAssaultWeapon["Ammo"]);
} }
m_Unreliable.Send(packet); m_Reliable.Send(packet);
} }
void Client::identifyPacketLoss() void Client::identifyPacketLoss()
+37 -34
View File
@@ -47,19 +47,19 @@ void Server::Update()
} }
} }
PlayerDefinition pd; //PlayerDefinition pd;
while (m_Unreliable.IsSocketAvailable()) { //while (m_Unreliable.IsSocketAvailable()) {
// Packet will get real data in receive // // Packet will get real data in receive
Packet packet(MessageType::Invalid); // Packet packet(MessageType::Invalid);
m_Unreliable.Receive(packet, pd); // m_Unreliable.Receive(packet, pd);
m_Address = pd.Endpoint.address(); // m_Address = pd.Endpoint.address();
m_Port = pd.Endpoint.port(); // m_Port = pd.Endpoint.port();
if (packet.GetMessageType() == MessageType::Connect) { // if (packet.GetMessageType() == MessageType::Connect) {
parseUDPConnect(packet); // parseUDPConnect(packet);
} else { // } else {
parseMessageType(packet); // parseMessageType(packet);
} // }
} //}
while (m_ServerlistRequest.IsSocketAvailable()) { while (m_ServerlistRequest.IsSocketAvailable()) {
Packet packet(MessageType::Invalid); Packet packet(MessageType::Invalid);
@@ -162,7 +162,7 @@ void Server::unreliableBroadcast(Packet& packet)
{ {
for (auto& kv : m_ConnectedPlayers) { for (auto& kv : m_ConnectedPlayers) {
packet.ChangePacketID(kv.second.PacketID); packet.ChangePacketID(kv.second.PacketID);
m_Unreliable.Send(packet, kv.second); // m_Unreliable.Send(packet, kv.second);
} }
} }
@@ -172,7 +172,7 @@ void Server::sendSnapshot()
Packet packet(MessageType::Snapshot); Packet packet(MessageType::Snapshot);
addInputCommandsToPacket(packet); addInputCommandsToPacket(packet);
addPlayersToPacket(packet, EntityID_Invalid); addPlayersToPacket(packet, EntityID_Invalid);
unreliableBroadcast(packet); reliableBroadcast(packet);
} }
void Server::addInputCommandsToPacket(Packet& packet) void Server::addInputCommandsToPacket(Packet& packet)
@@ -320,25 +320,28 @@ void Server::checkForTimeOuts()
} }
} }
void Server::parseUDPConnect(Packet & packet) //void Server::parseUDPConnect(Packet & packet)
{ //{
// Pop size of message int // // Pop size of message int
packet.ReadPrimitive<int>(); // packet.ReadPrimitive<int>();
int messageType = packet.ReadPrimitive<int>(); // int messageType = packet.ReadPrimitive<int>();
// Read packet ID // // Read packet ID
m_PreviousPacketID = m_PacketID; // Set previous packet id // m_PreviousPacketID = m_PacketID; // Set previous packet id
m_PacketID = packet.ReadPrimitive<int>(); //Read new packet id // m_PacketID = packet.ReadPrimitive<int>(); //Read new packet id
// parse player id and other stuff // // parse player id and other stuff
PlayerID playerID = packet.ReadPrimitive<int>(); // PlayerID playerID = packet.ReadPrimitive<int>();
// Do something here? // if (!EntityWrapper(m_World, playerID).Valid()) {
boost::asio::ip::udp::endpoint endpoint(m_Address, m_Port); //
m_ConnectedPlayers.at(playerID).Endpoint = endpoint; // }
LOG_INFO("parseUDPConnect: Spectator \"%s\" connected on IP: %s", m_ConnectedPlayers.at(playerID).Name.c_str(), m_ConnectedPlayers.at(playerID).Endpoint.address().to_string().c_str()); // // Do something here?
// Send a message to the player that connected // boost::asio::ip::udp::endpoint endpoint(m_Address, m_Port);
Packet connnectPacket(MessageType::Connect, m_ConnectedPlayers.at(playerID).PacketID); // m_ConnectedPlayers.at(playerID).Endpoint = endpoint;
m_Unreliable.Send(connnectPacket); // LOG_INFO("parseUDPConnect: Spectator \"%s\" connected on IP: %s", m_ConnectedPlayers.at(playerID).Name.c_str(), m_ConnectedPlayers.at(playerID).Endpoint.address().to_string().c_str());
LOG_INFO("UDP Connect sent to client"); // // Send a message to the player that connected
} // Packet connnectPacket(MessageType::Connect, m_ConnectedPlayers.at(playerID).PacketID);
// m_Unreliable.Send(connnectPacket);
// LOG_INFO("UDP Connect sent to client");
//}
void Server::parseTCPConnect(Packet & packet) void Server::parseTCPConnect(Packet & packet)
{ {
+8 -3
View File
@@ -21,33 +21,38 @@ void UDPServer::Send(Packet& packet, PlayerDefinition & playerDefinition)
boost::asio::buffer(packet.Data(), packet.Size()), boost::asio::buffer(packet.Data(), packet.Size()),
playerDefinition.Endpoint, playerDefinition.Endpoint,
0); 0);
LOG_INFO("Size of packet is %i", bytesSent);
} catch (const boost::system::system_error& e) { } catch (const boost::system::system_error& e) {
LOG_INFO(e.what());
// TODO: Clean up invalid endpoints out of m_ConnectedPlayers later // TODO: Clean up invalid endpoints out of m_ConnectedPlayers later
playerDefinition.Endpoint = boost::asio::ip::udp::endpoint(); playerDefinition.Endpoint = boost::asio::ip::udp::endpoint();
} }
} }
// Send back to endpoint of received packet // Send back to endpoint of received packet
void UDPServer::Send(Packet & packet) void UDPServer::Send(Packet & packet)
{ {
packet.UpdateSize(); packet.UpdateSize();
m_Socket->send_to( size_t bytesSent = m_Socket->send_to(
boost::asio::buffer( boost::asio::buffer(
packet.Data(), packet.Data(),
packet.Size()), packet.Size()),
m_ReceiverEndpoint, m_ReceiverEndpoint,
0); 0);
LOG_INFO("Size of packet is %i", bytesSent);
} }
// Broadcasting respond specific logic // Broadcasting respond specific logic
void UDPServer::Send(Packet & packet, boost::asio::ip::udp::endpoint endpoint) void UDPServer::Send(Packet & packet, boost::asio::ip::udp::endpoint endpoint)
{ {
packet.UpdateSize(); packet.UpdateSize();
m_Socket->send_to( size_t bytesSent = m_Socket->send_to(
boost::asio::buffer( boost::asio::buffer(
packet.Data(), packet.Data(),
packet.Size()), packet.Size()),
endpoint, endpoint,
0); 0);
LOG_INFO("Size of packet is %i", bytesSent);
} }
// Broadcasting // Broadcasting
@@ -55,7 +60,7 @@ void UDPServer::Broadcast(Packet & packet, int port)
{ {
packet.UpdateSize(); packet.UpdateSize();
m_Socket->set_option(boost::asio::socket_base::broadcast(true)); m_Socket->set_option(boost::asio::socket_base::broadcast(true));
m_Socket->send_to( size_t bytesSent = m_Socket->send_to(
boost::asio::buffer( boost::asio::buffer(
packet.Data(), packet.Data(),
packet.Size()), packet.Size()),
+1 -1
View File
@@ -196,7 +196,7 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
abj.BlendInfo.progress = 0.0; abj.BlendInfo.progress = 0.0;
abj.BlendInfo.Start = e.Start; abj.BlendInfo.Start = e.Start;
abj.BlendInfo.SingleBlend = e.SingleLevelBlend; abj.BlendInfo.SingleBlend = e.SingleLevelBlend;
abj.BlendInfo.Weight = e.Weight;
EntityWrapper nodeEntity = subTreeRoot.FirstChildByName(e.NodeName); // more than one EntityWrapper nodeEntity = subTreeRoot.FirstChildByName(e.NodeName); // more than one
if (nodeEntity.Valid()) { if (nodeEntity.Valid()) {
+16
View File
@@ -207,6 +207,22 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo)
{ {
std::vector<Node*> goalNodes = FindNodesByName(blendInfo.NodeName); std::vector<Node*> goalNodes = FindNodesByName(blendInfo.NodeName);
if(blendInfo.Weight >= 0 && blendInfo.Weight <= 1.0) {
for (auto it = goalNodes.begin(); it != goalNodes.end(); it++) {
EntityWrapper entity = (*it)->Entity;
if (entity.Valid()) {
if (entity.HasComponent("Blend")) {
(double&)entity["Blend"]["Weight"] = blendInfo.Weight;
}
}
}
return blendInfo;
}
if (blendInfo.Start) { if (blendInfo.Start) {
for (auto it = goalNodes.begin(); it != goalNodes.end(); it++) { for (auto it = goalNodes.begin(); it != goalNodes.end(); it++) {
EntityWrapper entity = (*it)->Entity; EntityWrapper entity = (*it)->Entity;
-4
View File
@@ -45,10 +45,6 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player)
//copy the data from player to explosioneffectmodel //copy the data from player to explosioneffectmodel
playerEntityModel.Copy(deathEffectEW["Model"]); playerEntityModel.Copy(deathEffectEW["Model"]);
playerEntityAnimation.Copy(deathEffectEW["Animation"]); playerEntityAnimation.Copy(deathEffectEW["Animation"]);
//freeze the animation
deathEffectEW["Animation"]["Speed1"] = 0.0;
deathEffectEW["Animation"]["Speed2"] = 0.0;
deathEffectEW["Animation"]["Speed3"] = 0.0;
//copy the models position,orientation //copy the models position,orientation
deathEffectEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"]; deathEffectEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
+187 -8
View File
@@ -83,11 +83,25 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
cameraOrientation.x = glm::clamp(cameraOrientation.x, -glm::half_pi<float>(), glm::half_pi<float>()); cameraOrientation.x = glm::clamp(cameraOrientation.x, -glm::half_pi<float>(), glm::half_pi<float>());
// Set third person model aim pitch // Set third person model aim pitch
EntityWrapper playerModel = player.FirstChildByName("PlayerModel"); EntityWrapper playerModel = player.FirstChildByName("PlayerModel");
//Third-person aim
if (playerModel.Valid()) { if (playerModel.Valid()) {
//ComponentWrapper cAnimationOffset = playerModel["AnimationOffset"]; EntityWrapper aimPrimaryEntity = playerModel.FirstChildByName("AimPrimary");
//float pitch = cameraOrientation.x + 0.2f; if(aimPrimaryEntity.Valid()){
//double time = (pitch + glm::half_pi<float>()) / glm::pi<float>(); if(aimPrimaryEntity.HasComponent("Animation")) {
//cAnimationOffset["Time"] = time; float pitch = cameraOrientation.x + 0.2f;
double time = (pitch + glm::half_pi<float>()) / glm::pi<float>();
(double&)aimPrimaryEntity["Animation"]["Time"] = time;
}
}
EntityWrapper aimSecondaryEntity = playerModel.FirstChildByName("AimSecondary");
if (aimSecondaryEntity.Valid()) {
if (aimSecondaryEntity.HasComponent("Animation")) {
float pitch = cameraOrientation.x + 0.2f;
double time = (pitch + glm::half_pi<float>()) / glm::pi<float>();
(double&)aimSecondaryEntity["Animation"]["Time"] = time;
}
}
} }
} }
@@ -182,10 +196,64 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
if (isOnGround) { if (isOnGround) {
(bool)cPhysics["IsOnGround"] = false; (bool)cPhysics["IsOnGround"] = false;
velocity.y = player["Player"]["JumpSpeed"]; velocity.y = player["Player"]["JumpSpeed"];
if (player.Valid()) {
EntityWrapper playerModel = player.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.15;
aeb.NodeName = "Jump";
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Restart = true;
m_EventBroker->Publish(aeb);
}
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.25;
aeb.NodeName = "StandCrouchBlend";
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Restart = false;
aeb.AnimationEntity = playerModel.FirstChildByName("Jump");
m_EventBroker->Publish(aeb);
}
}
}
} else if (player.HasComponent("DoubleJump") && !controller->DoubleJumping()) { } else if (player.HasComponent("DoubleJump") && !controller->DoubleJumping()) {
//Enter here if player can double jump and is doing so. //Enter here if player can double jump and is doing so.
(bool)cPhysics["IsOnGround"] = false; (bool)cPhysics["IsOnGround"] = false;
velocity.y = player["DoubleJump"]["DoubleJumpSpeed"]; velocity.y = player["DoubleJump"]["DoubleJumpSpeed"];
if (player.Valid()) {
EntityWrapper playerModel = player.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.15;
aeb.NodeName = "Jump";
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Restart = true;
m_EventBroker->Publish(aeb);
}
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.25;
aeb.NodeName = "StandCrouchBlend";
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.Restart = false;
aeb.AnimationEntity = playerModel.FirstChildByName("Jump");
m_EventBroker->Publish(aeb);
}
}
}
// If IsServer and network is off this will not work // If IsServer and network is off this will not work
if (IsClient) { if (IsClient) {
//put a hexagon at the players feet //put a hexagon at the players feet
@@ -276,7 +344,7 @@ void PlayerMovementSystem::playerStep(double dt)
bool PlayerMovementSystem::OnPlayerSpawned(Events::PlayerSpawned& e) bool PlayerMovementSystem::OnPlayerSpawned(Events::PlayerSpawned& e)
{ {
// When a player spawns, create an input controller for them // When a player spawns, create an input controller for them
m_PlayerInputControllers[e.Player] = new FirstPersonInputController<PlayerMovementSystem>(m_EventBroker, e.PlayerID); m_PlayerInputControllers[e.Player] = new FirstPersonInputController<PlayerMovementSystem>(m_EventBroker, e.PlayerID, e.Player);
if (e.PlayerID == -1) { if (e.PlayerID == -1) {
// Keep track of the local player // Keep track of the local player
m_LocalPlayer = e.Player; m_LocalPlayer = e.Player;
@@ -309,18 +377,129 @@ void PlayerMovementSystem::spawnHexagon(EntityWrapper target)
bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
{ {
EntityWrapper player(m_World, e.Player); EntityWrapper player(m_World, e.Player);
if (!player.Valid() || !IsClient || player.ID == LocalPlayer.ID) { if (!player.Valid() || !IsClient){// || player.ID == LocalPlayer.ID) {
return false; return false;
} }
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/DashEffect.xml"); auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/DashEffect.xml");
EntityWrapper dashEffect = entityFile->MergeInto(m_World); EntityWrapper dashEffect = entityFile->MergeInto(m_World);
auto playerModel = player.FirstChildByName("PlayerModel"); EntityWrapper playerModel = player.FirstChildByName("PlayerModel");
auto playerEntityModel = playerModel["Model"];
for (auto& kv : m_PlayerInputControllers) {
EntityWrapper player = kv.first;
auto& controller = kv.second;
if (!player.Valid()) {
continue;
}
if (player.Valid()) {
EntityWrapper playerModel = player.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
if (glm::abs(controller->Movement().x) > glm::abs(controller->Movement().z)) {
if (controller->Movement().x > 0) {
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "DashRight";
aeb.RootNode = playerModel;
aeb.Restart = true;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "StandCrouchBlend";
aeb.RootNode = playerModel;
aeb.Delay = -0.3;
aeb.Start = true;
aeb.Restart = false;
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
m_EventBroker->Publish(aeb);
}
} else {
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "DashLeft";
aeb.RootNode = playerModel;
aeb.Restart = true;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "StandCrouchBlend";
aeb.RootNode = playerModel;
aeb.Delay = -0.3;
aeb.Start = true;
aeb.Restart = false;
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
m_EventBroker->Publish(aeb);
}
}
} else {
if (controller->Movement().z < 0) {
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "DashForward";
aeb.RootNode = playerModel;
aeb.Restart = true;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "StandCrouchBlend";
aeb.RootNode = playerModel;
aeb.Delay = -0.3;
aeb.Start = true;
aeb.Restart = false;
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
m_EventBroker->Publish(aeb);
}
} else {
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "DashBackward";
aeb.RootNode = playerModel;
aeb.Restart = true;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
{
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.3;
aeb.NodeName = "StandCrouchBlend";
aeb.RootNode = playerModel;
aeb.Delay = -0.3;
aeb.Start = true;
aeb.Restart = false;
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
m_EventBroker->Publish(aeb);
}
}
}
}
}
}
/*
auto playerEntityAnimation = playerModel["Animation"]; auto playerEntityAnimation = playerModel["Animation"];
playerEntityModel.Copy(dashEffect["Model"]); playerEntityModel.Copy(dashEffect["Model"]);
playerEntityAnimation.Copy(dashEffect["Animation"]); playerEntityAnimation.Copy(dashEffect["Animation"]);
dashEffect["ExplosionEffect"]["EndColor"] = (glm::vec4)playerEntityModel["Color"]; dashEffect["ExplosionEffect"]["EndColor"] = (glm::vec4)playerEntityModel["Color"];
((glm::vec4&)dashEffect["ExplosionEffect"]["EndColor"]).w = 0.f; ((glm::vec4&)dashEffect["ExplosionEffect"]["EndColor"]).w = 0.f;
*/
return true; return true;
} }
+1 -1
View File
@@ -78,7 +78,7 @@ void ScoreScreenSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper&
if (it == m_PlayerIdentities.end()) { if (it == m_PlayerIdentities.end()) {
break; break;
} }
if(found == false) { if(found == false) {
if(it->second.Team != currentTeam) { if(it->second.Team != currentTeam) {
@@ -39,6 +39,12 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
ammo = glm::max(0, ammo - (magSize - magAmmo)); ammo = glm::max(0, ammo - (magSize - magAmmo));
magAmmo = glm::min(magSize, ammo); magAmmo = glm::min(magSize, ammo);
isReloading = false; isReloading = false;
if (wi.FirstPersonEntity.Valid()) {
wi.FirstPersonEntity["Model"]["Visible"] = true;
}
if (wi.ThirdPersonEntity.Valid()) {
wi.ThirdPersonEntity["Model"]["Visible"] = true;
}
} }
// Restore view angle // Restore view angle
@@ -57,19 +63,18 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
} }
// Update first person run animation // Update first person run animation
/*ComponentWrapper cPlayer = wi.Player["Player"]; ComponentWrapper cPlayer = wi.Player["Player"];
ComponentWrapper cPhysics = wi.Player["Physics"]; ComponentWrapper cPhysics = wi.Player["Physics"];
const float& movementSpeed = cPlayer["MovementSpeed"]; const float& movementSpeed = cPlayer["MovementSpeed"];
float speed = glm::length((const glm::vec3&)cPhysics["Velocity"]); float speed = glm::length((const glm::vec3&)cPhysics["Velocity"]);
float animationSpeed = glm::max(speed, movementSpeed) / movementSpeed; float animationWeight = glm::min(speed, movementSpeed) / movementSpeed;
EntityWrapper rootNode = wi.FirstPersonEntity.FirstParentWithComponent("Model"); EntityWrapper rootNode = wi.FirstPersonEntity.FirstParentWithComponent("Model");
if (rootNode.Valid()) { if (rootNode.Valid()) {
EntityWrapper animationNode = rootNode.FirstChildByName("Run"); EntityWrapper blend = rootNode.FirstChildByName("MovementBlend");
if (animationNode.Valid()) { if (blend.Valid()) {
(bool&)animationNode["Animation"]["Play"] = animationSpeed > 0; (double&)blend["Blend"]["Weight"] = animationWeight;
(double&)animationNode["Animation"]["Speed"] = animationSpeed;
} }
}*/ }
// Fire if we're able to fire // Fire if we're able to fire
if (canFire(cWeapon, wi)) { if (canFire(cWeapon, wi)) {
@@ -117,12 +122,25 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
// Play animation // Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Reload"); playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Reload");
if (IsClient) {
// Spawn explosion effect // Spawn explosion effect
EntityWrapper reloadEffectSpawner = wi.FirstPersonEntity.FirstChildByName("FirstPersonReloadSpawner"); EntityWrapper reloadEffectSpawner = wi.FirstPersonEntity.FirstChildByName("FirstPersonReloadSpawner");
if (reloadEffectSpawner.Valid()) { if (reloadEffectSpawner.Valid()) {
SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner); SpawnerSystem::Spawn(reloadEffectSpawner, reloadEffectSpawner);
}
if (wi.FirstPersonEntity.Valid()) {
wi.FirstPersonEntity["Model"]["Visible"] = false;
}
if (wi.ThirdPersonEntity.Valid()) {
wi.ThirdPersonEntity["Model"]["Visible"] = false;
}
} }
// Sound
Events::PlaySoundOnEntity e;
e.EmitterID = wi.Player.ID;
e.FilePath = "Audio/weapon/Assault/AssaultWeaponReload.wav";
m_EventBroker->Publish(e);
} }
void AssaultWeaponBehaviour::OnEquip(ComponentWrapper cWeapon, WeaponInfo& wi) void AssaultWeaponBehaviour::OnEquip(ComponentWrapper cWeapon, WeaponInfo& wi)
@@ -204,6 +222,12 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
// Play animation // Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Fire"); playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeAssaultWeapon", "Fire");
// Sound
Events::PlaySoundOnEntity e;
e.EmitterID = wi.Player.ID;
e.FilePath = "Audio/weapon/Assault/AssaultWeaponFire.wav";
m_EventBroker->Publish(e);
} }
bool AssaultWeaponBehaviour::canFire(ComponentWrapper cWeapon, WeaponInfo& wi) bool AssaultWeaponBehaviour::canFire(ComponentWrapper cWeapon, WeaponInfo& wi)
@@ -36,6 +36,7 @@ void DefenderWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
m_EventBroker->Publish(e); m_EventBroker->Publish(e);
} else { } else {
isReloading = false; isReloading = false;
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Idle");
} }
} }
@@ -96,6 +97,9 @@ void DefenderWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
// Start reload // Start reload
isReloading = true; isReloading = true;
reloadTimer = reloadTime; reloadTimer = reloadTime;
// Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Reload");
} }
void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi) void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi)
@@ -115,8 +119,40 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
if (attachment.Valid()) { if (attachment.Valid()) {
if (e.Value > 0) { if (e.Value > 0) {
SpawnerSystem::Spawn(attachment, attachment); SpawnerSystem::Spawn(attachment, attachment);
EntityWrapper root = wi.FirstPersonEntity.FirstParentWithComponent("Model");
if (root.Valid()) {
EntityWrapper subTree = root.FirstChildByName("FinalBlend");
if (subTree.Valid()) {
EntityWrapper animationNode = subTree.FirstChildByName("Shield");
if (animationNode.Valid()) {
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = root;
eFireBlend.NodeName = "Shield";
eFireBlend.Restart = true;
eFireBlend.Start = true;
m_EventBroker->Publish(eFireBlend);
}
}
}
} else { } else {
attachment.DeleteChildren(); attachment.DeleteChildren();
EntityWrapper root = wi.FirstPersonEntity.FirstParentWithComponent("Model");
if (root.Valid()) {
EntityWrapper subTree = root.FirstChildByName("FinalBlend");
if (subTree.Valid()) {
EntityWrapper animationNode = subTree.FirstChildByName("ActionBlend");
if (animationNode.Valid()) {
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = root;
eFireBlend.NodeName = "ActionBlend";
eFireBlend.Restart = true;
eFireBlend.Start = true;
m_EventBroker->Publish(eFireBlend);
}
}
}
} }
} }
} }
@@ -195,6 +231,9 @@ void DefenderWeaponBehaviour::fireShell(ComponentWrapper cWeapon, WeaponInfo& wi
} }
} }
// Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeDefenderWeapon", "Fire");
// Sound // Sound
Events::PlaySoundOnEntity e; Events::PlaySoundOnEntity e;
e.EmitterID = wi.Player.ID; e.EmitterID = wi.Player.ID;