Merge remote-tracking branch 'origin/master' into Dirtybit

# Conflicts:
#	src/Engine/Collision/CollisionSystem.cpp
#	src/Engine/Core/Transform.cpp
#	src/Engine/Editor/EditorSystem.cpp
#	src/Engine/Rendering/AnimationSystem.cpp
#	src/Engine/Rendering/BoneAttachmentSystem.cpp
#	src/Game/Systems/CapturePointSystem.cpp
#	src/Game/Systems/ExplosionEffectSystem.cpp
#	src/Game/Systems/PlayerMovementSystem.cpp
This commit is contained in:
2016-03-12 03:37:29 +01:00
220 changed files with 61854 additions and 9148 deletions
@@ -36,7 +36,7 @@ void DefenderWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
m_EventBroker->Publish(e);
} else {
isReloading = false;
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Idle");
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "ReloadEnd");
}
}
@@ -99,7 +99,21 @@ void DefenderWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi)
reloadTimer = reloadTime;
// Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Reload");
if (wi.FirstPersonEntity.Valid()) {
Events::AutoAnimationBlend eBlendStart;
eBlendStart.RootNode = wi.FirstPersonEntity;
eBlendStart.NodeName = "ReloadStart";
eBlendStart.Restart = true;
eBlendStart.Start = true;
m_EventBroker->Publish(eBlendStart);
Events::AutoAnimationBlend eBlendLoop;
eBlendLoop.RootNode = wi.FirstPersonEntity;
eBlendLoop.NodeName = "ReloadLoop";
eBlendLoop.Restart = true;
eBlendLoop.Start = true;
eBlendLoop.AnimationEntity = wi.FirstPersonEntity.FirstChildByName("ReloadStart");
m_EventBroker->Publish(eBlendLoop);
}
}
void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi)
@@ -114,17 +128,18 @@ void DefenderWeaponBehaviour::OnHolster(ComponentWrapper cWeapon, WeaponInfo& wi
bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInfo& wi, const Events::InputCommand& e)
{
if (e.Command == "SpecialAbility" && IsServer) {
if (e.Command == "SpecialAbility") {
EntityWrapper attachment = wi.Player.FirstChildByName("ShieldAttachment");
if (attachment.Valid()) {
if (e.Value > 0) {
SpawnerSystem::Spawn(attachment, attachment);
if (IsServer) {
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 (IsClient) {
EntityWrapper root = wi.FirstPersonEntity;
if (root.Valid()) {
EntityWrapper animationNode = root.FirstChildByName("Shield");
if (animationNode.Valid()) {
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = root;
@@ -138,11 +153,10 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
} else {
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 (IsClient) {
EntityWrapper root = wi.FirstPersonEntity;
if (root.Valid()) {
EntityWrapper animationNode = root.FirstChildByName("ActionBlend");
if (animationNode.Valid()) {
Events::AutoAnimationBlend eFireBlend;
eFireBlend.RootNode = root;
@@ -232,7 +246,7 @@ void DefenderWeaponBehaviour::fireShell(ComponentWrapper cWeapon, WeaponInfo& wi
}
// Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "BlendTreeDefenderWeapon", "Fire");
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Fire");
// Sound
Events::PlaySoundOnEntity e;