Compare commits

..

62 Commits

Author SHA1 Message Date
Jocke b547938928 timestep logic added, but is not used. 2016-02-19 13:24:06 +01:00
Jocke d1832c1741 WIP Timestamps 2016-02-17 17:07:17 +01:00
Jocke 4432891437 Fixed crash in Client::parsePlayerDamage. 2016-02-17 10:21:50 +01:00
Jocke a006db9e63 WIP Fix dsync 2016-02-16 16:06:17 +01:00
Jocke 717af2c4a4 Fixed bug in Client::parsePlayerDamage() 2016-02-16 10:22:15 +00:00
Jace 969e7cb0d5 Merge remote-tracking branch 'origin/FixNetworkToPlayTest' 2016-02-12 09:18:32 +01:00
Jace 47a365a8fc Inverted capture point numbers to fix HUD 2016-02-12 09:17:39 +01:00
Jace 71c03326aa Debug.EditorEnabled 2016-02-12 09:17:28 +01:00
Jocke ba69c79821 Fixed bug in Server. 2016-02-12 09:13:43 +01:00
Jace 0a31fa3dfd Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-02-12 09:08:17 +01:00
Jace ca457d9c00 Player names 2016-02-12 09:07:59 +01:00
antc13 a08e54a147 Blocked up a path in the Spawns a bit more. 2016-02-12 08:44:40 +01:00
Jocke 2c3122bbdb increased Network buffer size, fixed 2 crashes and re-added the ability to kill oneself with the use of a key bound to TakeDamage,Value. 2016-02-12 08:39:20 +01:00
Jace 10846be820 Merge pull request #109 from teamfisk/Sound
Added weapon sounds.
2016-02-12 08:23:30 +01:00
stiffly 9df7b32ca1 Merge remote-tracking branch 'origin/master' into Sound 2016-02-12 08:20:01 +01:00
stiffly 3d4a7de59d MiniDump.cpp was not added to CMakeLists.txt. 2016-02-12 08:19:47 +01:00
stiffly 1cdcbf9b32 Merge remote-tracking branch 'origin/master' into Sound
# Conflicts:
#	src/Game/Systems/PlayerSpawnSystem.cpp
#	src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp
2016-02-12 08:19:29 +01:00
antc13 9e8d2b99df Merge branch 'master' of https://github.com/teamfisk/TacticalZ 2016-02-12 08:16:23 +01:00
antc13 ba4877c3f7 Moved Spawn locations and added ammo/health pickups around the map. 2016-02-12 08:16:12 +01:00
stiffly af39b892cd Now plays a "Empty sound", "reload sound" and "hit mark sound" on appropriate occasions. 2016-02-12 08:05:35 +01:00
Jace 1ed5107d9b Merge pull request #108 from teamfisk/MiniDump
Minidump on crash
2016-02-12 08:04:25 +01:00
antc13 2ce7179d19 Merge branch 'master' of https://github.com/teamfisk/TacticalZ 2016-02-12 07:49:58 +01:00
Jace eb7b22c757 Latest assets 2016-02-12 07:48:26 +01:00
Jace b48d491ad7 Complete blue and red player entities 2016-02-12 07:45:51 +01:00
Jocke 7d732c75ca Server now removes players that have disconnected. 2016-02-12 07:42:01 +01:00
Jace 47f4711b85 Merge remote-tracking branch 'origin/Menu' into WeaponSystem
# Conflicts:
#	resources/Schema/Entities/Player.xml
#	resources/Schema/Types/Entity.xsd
#	src/Game/Systems/PlayerSpawnSystem.cpp
2016-02-12 07:18:20 +01:00
Jace 78e318c032 Proper snapshot filtering 2016-02-12 07:14:36 +01:00
Jace bb66f95d43 Enabled server broadcasting PlayerDamage events to other players to make damage indicators work 2016-02-12 07:03:14 +01:00
Jace cc422cf73a Fixed PlayerDeath being fired multiple times per frame on the server, causing multiple spawns and other weirdness 2016-02-12 06:30:19 +01:00
Jace 2e5ee633ce Fixed bug when client would recieve input command from an entity that the client didn't know about 2016-02-12 06:10:20 +01:00
Tleety 1e04244590 Fixed network bug sorta 2016-02-12 06:00:42 +01:00
viktorljung f146971db0 Fixed size 2016-02-12 05:45:17 +01:00
viktorljung 60b2c9bc9b KillFeed 2016-02-12 05:41:05 +01:00
Tleety d357e365cb Merge remote-tracking branch 'origin/TCPConnections' into WeaponSystem
# Conflicts:
#	include/Engine/Network/Server.h
#	src/Engine/Network/Client.cpp
#	src/Engine/Network/Server.cpp
2016-02-12 05:21:00 +01:00
Tleety a8a3366e8a Hopeless attempts to fix network bugs 2016-02-12 05:17:09 +01:00
William Moberg 422bedb844 MiniDump name now depends on time e.g. TacticalZ Fri 04-20-49. 2016-02-12 04:22:11 +01:00
stiffly 1da432ba23 WIP sounds 2016-02-12 04:03:35 +01:00
Jace 787eecce26 WIP 2016-02-12 04:03:22 +01:00
William Moberg 215b1b1aa4 On crash, takes minidump, then show MessageBox, and exit app. 2016-02-12 03:32:42 +01:00
antc13 f49cacf167 Merge branch 'master' of https://github.com/teamfisk/TacticalZ 2016-02-12 02:47:50 +01:00
Jace a15e01596a Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-02-12 02:47:12 +01:00
antc13 a5168bd1c2 Merge branch 'master' of https://github.com/teamfisk/TacticalZ 2016-02-12 02:46:52 +01:00
antc13 784e1eb69b Changed Colors on some materials and changed bridges to red and blue bridges. 2016-02-12 02:46:44 +01:00
Jace b5e372896f Added spawner? 2016-02-12 02:46:42 +01:00
Jace a54156fab3 Added HUD elements to player 2016-02-12 02:46:16 +01:00
viktorljung 987dafb44a Fixed Health text color 2016-02-12 02:38:11 +01:00
Jace 47053285c8 Merge remote-tracking branch 'origin/Menu' into WeaponSystem
# Conflicts:
#	resources/Schema/Entities/Player.xml
#	resources/Schema/Types/Entity.xsd
2016-02-12 02:30:38 +01:00
Jace bee0630a26 Merge remote-tracking branch 'origin/master' into WeaponSystem 2016-02-12 02:27:44 +01:00
Jace 1dc3756533 Fixed respawn crash when a player died that had never spawned 2016-02-12 02:23:13 +01:00
Jace b9ea314232 Merge remote-tracking branch 'origin/master' into WeaponSystem
# Conflicts:
#	resources/Schema/Entities/NewMap.xml
2016-02-12 02:11:11 +01:00
Jace 71533b52ae Map fix 2016-02-12 02:10:42 +01:00
viktorljung 6442254575 Merge remote-tracking branch 'origin/master' into Menu
# Conflicts:
#	src/Game/Game.cpp
2016-02-12 02:09:14 +01:00
viktorljung 021c4e36d7 New HUD XML files 2016-02-12 02:08:24 +01:00
viktorljung fb5164221f HealthHUD redesigned 2016-02-12 01:57:53 +01:00
Jace 88c7c57671 Merge remote-tracking branch 'origin/master' into WeaponSystem 2016-02-12 01:46:45 +01:00
Jace 5295133311 Hack to sync ammo over network until we have input replaying + Reload effect from all views 2016-02-12 01:45:54 +01:00
viktorljung 0370775820 Merge remote-tracking branch 'origin/master' into Menu
# Conflicts:
#	resources/Schema/Entities/Player.xml
2016-02-12 00:28:24 +01:00
viktorljung a36ed76a4e AmmunitionHUDSystem now really working 2016-02-12 00:26:59 +01:00
Jace 30f454e6a4 Entity fixes 2016-02-11 23:50:57 +01:00
viktorljung c1860ae383 AmmunitionHUD now working 2016-02-11 23:38:25 +01:00
viktorljung 851418b1de Merge remote-tracking branch 'origin/master' into Menu 2016-02-11 21:16:31 +01:00
viktorljung fee50ba3b6 Crash fix 2016-02-11 21:16:10 +01:00
62 changed files with 3816 additions and 288 deletions
+1 -1
Submodule assets updated: 078e014f3d...1e7adc749e
+2
View File
@@ -16,6 +16,8 @@ struct InputCommand : Event
std::string Command;
/** The value of the command. */
float Value = 0;
/** Timestamp of the command. */
double TimeStamp = 0;
};
}
+8 -9
View File
@@ -33,8 +33,8 @@ public:
~Client();
void Connect(std::string address, int port);
void Update() override;
void Update(double dt) override;
private:
std::vector<Events::PlayerSpawned> m_PlayerSpawnEvents;
void parseSpawnEvents();
// Save for children
@@ -56,13 +56,13 @@ public:
bool m_IsConnected = false;
EntityWrapper m_LocalPlayer = EntityWrapper::Invalid;
// Server Client Lookup map
// Assumes that root node for client and server is EntityID 0.
// Don't Add items to these two maps with insert, use insertIntoServerClientMaps(EntityID, EntityID)!!!!
std::unordered_map<EntityID, EntityID> m_ServerIDToClientID;
std::unordered_map<EntityID, EntityID> m_ClientIDToServerID;
// Network logic
UDPClient m_Unreliable;
TCPClient m_Reliable;
PlayerDefinition m_PlayerDefinitions[8];
SnapshotDefinitions m_NextSnapshot;
double m_DurationOfPingTime;
@@ -70,9 +70,9 @@ public:
std::clock_t m_TimeSinceSentInputs;
unsigned int m_SendInputIntervalMs;
std::vector<Events::InputCommand> m_InputCommandBuffer;
std::vector<Events::InputCommand> m_ReceivedInputCommands;
// Private member functions
size_t receive(char* data);
void disconnect();
void parseMessageType(Packet& packet);
void updateFields(Packet& packet, const ComponentInfo& componentInfo, const EntityID& entityID);
@@ -88,6 +88,8 @@ public:
void parseComponentDeletion(Packet& packet);
void InterpolateFields(Packet & packet, const ComponentInfo & componentInfo, const EntityID & entityID, const std::string & componentType);
void parseSnapshot(Packet& packet);
void parseOnInputCommand(Packet& packet);
void publishInputCommands();
void identifyPacketLoss();
void hasServerTimedOut();
EntityID createPlayer();
@@ -109,10 +111,7 @@ public:
bool OnPlayerDamage(const Events::PlayerDamage& e);
EventRelay<Client, Events::PlayerSpawned> m_EPlayerSpawned;
bool OnPlayerSpawned(const Events::PlayerSpawned& e);
private:
UDPClient m_Unreliable;
TCPClient m_Reliable;
void parsePlayerDamage(Packet& packet);
};
#endif
+3 -1
View File
@@ -22,11 +22,13 @@ public:
Network(World* world, EventBroker* eventBroker);
virtual ~Network() { };
virtual void Update() = 0;
virtual void Update(double dt) = 0;
protected:
World* m_World;
EventBroker* m_EventBroker;
// for network
double m_TimeStamp = 0;
// For Debug
bool isReadingData = false;
+1 -1
View File
@@ -2,7 +2,7 @@
#define NetworkClient_h__
#include "Network/Packet.h"
#define BUFFERSIZE 32000
#define BUFFERSIZE 64000
typedef unsigned int PlayerID;
typedef unsigned int PacketID;
+1 -1
View File
@@ -3,7 +3,7 @@
#include <boost/asio.hpp>
#include "Network/Packet.h"
#include "Network/PlayerDefinition.h"
#define BUFFERSIZE 32000
#define BUFFERSIZE 64000
typedef unsigned int PlayerID;
typedef unsigned int PacketID;
+6 -1
View File
@@ -26,7 +26,7 @@ public:
Server(World* world, EventBroker* eventBroker, int port);
~Server();
void Update() override;
void Update(double dt) override;
private:
// Network channels
@@ -52,6 +52,7 @@ private:
int checkTimeOutInterval = 100;
int m_NextPlayerID = 0;
std::vector<Events::InputCommand> m_InputCommandsToBroadcast;
std::vector<Events::InputCommand> m_InputCommandsToPublish;
//Timers
std::clock_t m_StartPingTime;
@@ -81,6 +82,8 @@ private:
void parseUDPConnect(Packet & packet);
void parseTCPConnect(Packet & packet);
void parseDisconnect();
bool shouldSendToClient(EntityWrapper childEntity);
void publishInputCommands();
// Debug event
EventRelay<Server, Events::InputCommand> m_EInputCommand;
@@ -91,6 +94,8 @@ private:
bool OnEntityDeleted(const Events::EntityDeleted& e);
EventRelay<Server, Events::ComponentDeleted> m_EComponentDeleted;
bool OnComponentDeleted(const Events::ComponentDeleted& e);
EventRelay<Server, Events::PlayerDamage> m_EPlayerDamage;
bool OnPlayerDamage(const Events::PlayerDamage& e);
};
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef MiniDump_h__
#define MiniDump_h__
#include <Windows.h>
void WINAPI Create_Dump(PEXCEPTION_POINTERS pException, BOOL File_Flag, BOOL Show_Flag);
#endif
@@ -0,0 +1,17 @@
#ifndef AmmunitionHUDSystem_h__
#define AmmunitionHUDSystem_h__
#include "../../Engine/Core/System.h"
#include "../../Engine/GLM.h"
class AmmunitionHUDSystem : public ImpureSystem
{
public:
AmmunitionHUDSystem(SystemParams params)
: System(params)
{ }
virtual void Update(double dt) override;
};
#endif
@@ -3,13 +3,11 @@
#include "../../Engine/Core/System.h"
#include "../../Engine/GLM.h"
#include "../../Engine/Rendering/ESetCamera.h"
#include <imgui/imgui.h>
class PlayerHUDSystem : public ImpureSystem
class HealthHUDSystem : public ImpureSystem
{
public:
PlayerHUDSystem(SystemParams params)
HealthHUDSystem(SystemParams params)
: System(params)
{ }
+5 -2
View File
@@ -9,7 +9,8 @@
#include "Core/EPlayerDamage.h"
#include "Core/EPlayerHealthPickup.h"
#include "Core/EPlayerDeath.h"
#include "../Engine/Input/EInputCommand.h"
#include "Core/ConfigFile.h"
#include "Input/EInputCommand.h"
#include <tuple>
#include <vector>
@@ -24,6 +25,8 @@ public:
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt) override;
private:
bool m_NetworkEnabled;
//methods which will take care of specific events
EventRelay<HealthSystem, Events::PlayerDamage> m_EPlayerDamage;
bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e);
@@ -34,7 +37,7 @@ private:
//vector which will keep track of health changes
std::vector<std::tuple<EntityID, double>> m_DeltaHealthVector;
};
#endif
+39
View File
@@ -0,0 +1,39 @@
#ifndef KillFeedSystem_h__
#define KillFeedSystem_h__
#include "../../Engine/Core/System.h"
#include "../../Engine/GLM.h"
#include "Core/EPlayerDeath.h"
class KillFeedSystem : public ImpureSystem
{
public:
KillFeedSystem(SystemParams params)
: System(params)
{
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDeath, &KillFeedSystem::OnPlayerDeath);
}
virtual void Update(double dt) override;
private:
EventRelay<KillFeedSystem, Events::PlayerDeath> m_EPlayerDeath;
bool KillFeedSystem::OnPlayerDeath(Events::PlayerDeath& e);
struct KillFeedInfo
{
std::string Content;
glm::vec4 Color;
float TimeToLive = 5.f;
};
std::list<KillFeedInfo> m_DeathQueue;
};
#endif
+1 -1
View File
@@ -39,5 +39,5 @@ private:
bool OnPlayerSpawned(Events::PlayerSpawned& e);
void updateMovementControllers(double dt);
void updateVelocity(double dt);
void updateVelocity(EntityWrapper player, double dt);
};
@@ -1,11 +1,13 @@
#include "Sound/EPlaySoundOnEntity.h"
#include "Collision/Collision.h"
#include "Rendering/AnimationSystem.h"
#include "Core/ConfigFile.h"
#include "WeaponBehaviour.h"
#include "../SpawnerSystem.h"
#include "Core/EPlayerDamage.h"
#include "Core/EShoot.h"
class AssaultWeaponBehaviour : public WeaponBehaviour
{
public:
@@ -19,11 +21,13 @@ public:
private:
EntityWrapper m_FirstPersonModel;
EntityWrapper m_ThirdPersonModel;
// State
bool m_Firing = false;
bool m_Reloading = false;
double m_ReloadTimer = 0.0;
EntityWrapper m_ReloadImpersonator;
EntityWrapper m_FirstPersonReloadImpersonator;
EntityWrapper m_ThirdPersonReloadImpersonator;
double m_TimeSinceLastFire = 0.0;
EventRelay<WeaponBehaviour, Events::AnimationComplete> m_EAnimationComplete;
@@ -33,7 +37,8 @@ private:
void fireRound();
void spawnTracer();
float traceRayDistance(glm::vec3 origin, glm::vec3 direction);
void playSound();
void playFireSound();
void playEmptySound();
void viewPunch();
void finishReload();
void playShootAnimation();
+1 -1
View File
@@ -23,7 +23,7 @@ StartNetwork=false
IsServer=false
Name=Bob
Address=127.0.0.1
Port=13
Port=27666
MaxConnections=8
SnapshotInterval=0.05
SendInputIntervalMs=33
+2
View File
@@ -40,4 +40,6 @@
<xs:include schemaLocation="Components/Sprite.xsd"/>
<xs:include schemaLocation="Components/Shielded.xsd"/>
<xs:include schemaLocation="Components/CapturePointHUD.xsd"/>
<xs:include schemaLocation="Components/AmmunitionHUD.xsd"/>
<xs:include schemaLocation="Components/KillFeed.xsd"/>
</xs:schema>
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<AmmunitionHUD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AmmunitionHUD.xsd">
</AmmunitionHUD>
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:include schemaLocation="../Types/TeamEnum.xsd"/>
<xs:element name="AmmunitionHUD">
<xs:annotation>
<xs:documentation>Hud element for tracking ammunition from parent with AssaultWeapon component. Child with the name "MagazineAmmo" tracks clip ammunition. Child with the name "Ammo" tracks ammo.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
+3
View File
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<KillFeed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="KillFeed.xsd">
</KillFeed>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="KillFeed">
<xs:annotation>
<xs:documentation>HUD element for tracking the 3 last kills, printed on the children with the names "KillFeed1", "KillFeed2", "KillFeed3"</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Text.xsd">
<Content>Text</Content>
<Content></Content>
<Resource></Resource>
<Color R="1" G="1" B="1" A="1"/>
<Visible>true</Visible>
+98
View File
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AmmunitionHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
<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>
<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>
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<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>
<Entity>
<Components>
<c:Transform>
<Position X="-0.00200000009" Y="0.00400000019" Z="-0.00100000005"/>
</c:Transform>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<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>
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AmmunitionHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
<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>
<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:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<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>
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="HudOrigin" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Entity name="CapturePointHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform>
<Position X="-24.3529072" Y="0" Z="6.95243597"/>
<Position X="0" Y="0.190541431" Z="0"/>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
+255
View File
@@ -0,0 +1,255 @@
<?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">
<Components>
<c:AABB>
<Origin X="0" Y="0.772000015" Z="0"/>
<Size X="1" Y="1.60000002" Z="1"/>
</c:AABB>
<c:AssaultWeapon>
<RPM>600</RPM>
</c:AssaultWeapon>
<c:Collidable/>
<c:DashAbility/>
<c:Health/>
<c:Physics>
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
</c:Physics>
<c:Player>
<MovementSpeed>5</MovementSpeed>
</c:Player>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.0288832653" Z="2.64837074"/>
</c:Transform>
</Components>
<Children>
<Entity name="Camera">
<Components>
<c:Camera/>
<c:Transform>
<Position X="0" Y="1.27700007" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="PlayerName">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.100000001" Y="0.248000011" Z="-0.248000011"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="CameraModel">
<Components>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.0331346765" Z="-0.0792061687"/>
<Scale X="1.30000007" Y="1.50000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HUD">
<Components>
<c:Transform>
<Position X="0" Y="0" Z="-0.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Model>
<Resource>Models/Core/UnitHexagon.mesh</Resource>
<Color A="1" B="0.70588237" G="0.70588237" R="0.70588237"/>
</c:Model>
<c:Transform>
<Position X="-0.383000016" Y="-0.185000002" Z="0"/>
<Scale X="0.150000006" Y="0.150000006" Z="0.150000006"/>
<Orientation X="0" Y="0.594000041" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Crosshair">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.200000003"/>
<Scale X="0.0250000004" Y="0.0250000004" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Hands">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>0.28963486380924053</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.120430455" Y="-0.231800437" Z="-0.181454748"/>
<Orientation X="0.0104047749" Y="-0.00268166233" Z="0.042844031"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponReloadEffect.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ThirdPersonCamera">
<Components>
<c:Camera/>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-0.284000009" Y="1.83800006" Z="1.18900001"/>
<Orientation X="5.95600033" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="PlayerModel">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>0.42156525436696768</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:AnimationOffset>
<AnimationName>AimRifle</AnimationName>
<Time>0.5</Time>
</c:AnimationOffset>
<c:HiddenForLocalPlayer/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ThirdPersonWeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0.160716802" Y="1.02800739" Z="-0.215931982"/>
<Orientation X="-0.0627654716" Y="-0.0450839326" Z="0.119217664"/>
</c:Transform>
</Components>
<Children>
<Entity name="ThirdPersonWeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="AABBStanding">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.427450985" B="1" G="1" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
<Scale X="1" Y="1.60000002" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AABBCrouching">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.745098054" B="1" G="0" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
+11 -12
View File
@@ -2,27 +2,26 @@
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Model>
<Resource>Models/Effects/JumpEffectHexagon.mesh</Resource>
<Color A="0.576470613" B="500" G="255" R="0.854901969"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.600000024" Y="0.800000012" Z="0"/>
<Scale X="0.50000012" Y="0.50000019" Z="0.50000014"/>
</c:Transform>
<c:Lifetime>
<Lifetime>0.5</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance>
<Velocity X="0" Y="-7.76300049" Z="0"/>
<ExplosionOrigin X="0" Y="2.67900002" Z="0"/>
<Velocity X="3.60000014" Y="3.93700027" Z="0"/>
<ExponentialAccelaration>true</ExponentialAccelaration>
<ExplosionDuration>0.5</ExplosionDuration>
<EndColor A="0" B="0" G="0" R="1"/>
<EndColor A="0" B="1" G="1" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Effects/JumpEffectHexagon.mesh</Resource>
<Color A="0.545098066" B="500" G="255" R="0.854901969"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.600000024" Y="0.800000012" Z="0"/>
<Scale X="0.500000119" Y="0.500000179" Z="0.500000119"/>
</c:Transform>
</Components>
<Children/>
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="HealthHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="HealthText">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="1" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Text>
<Content>100/100</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="0.392156869" B="1" G="0" R="0"/>
</c:Text>
<c:Transform>
<Position X="-0.355000019" Y="-0.203000009" Z="0.0410000011"/>
<Scale X="0.0350000001" Y="0.0350000001" Z="0.0350000001"/>
<Orientation X="0" Y="0.410000026" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0.196078435" B="1" G="0" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:HealthHUD/>
<c:Transform>
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
<Orientation X="5.87300014" Y="0" Z="4.71200037"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+361 -42
View File
@@ -89,6 +89,7 @@
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Highground5.mesh</Resource>
<Color A="1" B="7.84313726" G="7.84313726" R="7.84313726"/>
</c:Model>
<c:Transform/>
</Components>
@@ -99,6 +100,7 @@
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Highground6.mesh</Resource>
<Color A="1" B="7.84313726" G="7.84313726" R="7.84313726"/>
</c:Model>
<c:Transform/>
</Components>
@@ -368,7 +370,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Pillars/SciFiPillar2.mesh</Resource>
<Resource>Models/Props/Pillars/SciFiPillar2Blue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="55.0098839" Y="0" Z="80.7891693"/>
@@ -381,7 +383,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Pillars/SciFiPillar2.mesh</Resource>
<Resource>Models/Props/Pillars/SciFiPillar2Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-57.6669235" Y="-0.0117412386" Z="-84.8278427"/>
@@ -591,7 +593,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="56.3723755" Y="-0.458255291" Z="53.1675453"/>
<Position X="57.2414131" Y="-0.458255291" Z="53.1675453"/>
</c:Transform>
</Components>
<Children>
@@ -724,7 +726,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-2.87285304" Y="0" Z="0.0110195652"/>
<Position X="-3.20842171" Y="0" Z="0.0110195652"/>
<Scale X="1" Y="0.800000012" Z="1"/>
</c:Transform>
</Components>
@@ -737,7 +739,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="2.9002583" Y="0" Z="-0.00627081469"/>
<Position X="3.16696811" Y="0" Z="-0.00627081469"/>
<Scale X="1" Y="0.800000012" Z="1"/>
</c:Transform>
</Components>
@@ -1289,7 +1291,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="42.3930092" Y="-0.436794043" Z="53.3168259"/>
<Position X="42.6762505" Y="-0.436794043" Z="53.3168259"/>
</c:Transform>
</Components>
<Children>
@@ -1300,7 +1302,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="2.79896975" Y="0" Z="0"/>
<Position X="3.02606034" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
@@ -1312,7 +1314,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="5.67178059" Y="0" Z="0"/>
<Position X="6.20324564" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
@@ -1324,7 +1326,7 @@
<Resource>Models/Props/Walls/BigWallBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="8.55263519" Y="0" Z="0"/>
<Position X="9.40820885" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
@@ -1515,6 +1517,7 @@
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Flora/SpecialRoot.mesh</Resource>
<Color A="1" B="1" G="7.84313726" R="7.84313726"/>
</c:Model>
<c:Transform>
<Position X="-37.5227966" Y="-0.41070056" Z="38.790432"/>
@@ -1885,7 +1888,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFiBridge.mesh</Resource>
<Resource>Models/Props/Bridges/SciFiBridge1Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="45.3988762" Y="6.10456753" Z="-73.9011993"/>
@@ -2004,7 +2007,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFiBridge.mesh</Resource>
<Resource>Models/Props/Bridges/SciFiBridge1Blue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-41.0066338" Y="6.08244133" Z="75.8575821"/>
@@ -2138,7 +2141,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFiBridge.mesh</Resource>
<Resource>Models/Props/Bridges/SciFiBridge1Blue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-47.6850471" Y="7.0585866" Z="38.1646194"/>
@@ -2151,7 +2154,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFiBridge.mesh</Resource>
<Resource>Models/Props/Bridges/SciFiBridge1Blue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-25.9571095" Y="6.43997049" Z="41.7452164"/>
@@ -2178,7 +2181,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFiBridge.mesh</Resource>
<Resource>Models/Props/Bridges/SciFiBridge1Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="46.3167992" Y="6.36057663" Z="-37.5957794"/>
@@ -2191,7 +2194,7 @@
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFiBridge.mesh</Resource>
<Resource>Models/Props/Bridges/SciFiBridge1Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="25.2147388" Y="6.4451251" Z="-41.7257042"/>
@@ -2730,6 +2733,7 @@
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Flora/SpecialRoot.mesh</Resource>
<Color A="1" B="1" G="7.84313726" R="7.84313726"/>
</c:Model>
<c:Transform>
<Position X="36.8391495" Y="0.354240507" Z="-36.1228752"/>
@@ -2948,6 +2952,7 @@
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Flora/SpecialRoot.mesh</Resource>
<Color A="1" B="1" G="7.84313726" R="7.84313726"/>
</c:Model>
<c:Transform>
<Position X="-15.8430891" Y="2.84977508" Z="55.3108711"/>
@@ -3061,6 +3066,7 @@
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Flora/SpecialRoot.mesh</Resource>
<Color A="1" B="1" G="7.84313726" R="7.84313726"/>
</c:Model>
<c:Transform>
<Position X="16.3593407" Y="4.03186893" Z="-54.4961166"/>
@@ -3304,6 +3310,60 @@
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/BigStone.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="2.85156512" Y="-1.23010564" Z="-1.48294902"/>
<Scale X="1.50000012" Y="1" Z="1.4000001"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/MediumStone2.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-8.1107378" Y="1.61279738" Z="6.04347277"/>
<Scale X="2.70000005" Y="2.20000005" Z="2.4000001"/>
<Orientation X="1.02200007" Y="1.27200007" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/BigStone.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-12.3116245" Y="3.30153632" Z="2.33947349"/>
<Orientation X="0" Y="3.46600008" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/BigStone.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="2.7208035" Y="0.631672204" Z="1.97706997"/>
<Orientation X="0" Y="0" Z="5.86300039"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity>
@@ -3313,7 +3373,7 @@
<Resource>Models/Props/Stones/BigStone.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-32.077774" Y="1.78250229" Z="-52.9675865"/>
<Position X="-32.141304" Y="1.78250229" Z="-52.9675865"/>
</c:Transform>
</Components>
<Children>
@@ -3343,6 +3403,46 @@
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/BigStone.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="13.3016024" Y="-1.04082656" Z="-2.06582665"/>
<Orientation X="0" Y="1.17200005" Z="6.28300047"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/SmallStone1.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="7.52924776" Y="0.407071143" Z="-2.09290624"/>
<Scale X="3.4000001" Y="5.70000029" Z="3.70000029"/>
<Orientation X="0" Y="1.7700001" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Stones/BigStone.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-5.73053885" Y="-0.909733951" Z="4.32710028"/>
<Orientation X="0" Y="3.46600008" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
@@ -3692,7 +3792,7 @@
<Resource>Models/Props/Stones/SmallStone1.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="17.9978104" Y="0.729522109" Z="64.9478226"/>
<Position X="17.9978104" Y="0.729522109" Z="65.3742523"/>
<Scale X="3" Y="3" Z="3"/>
<Orientation X="2.68900013" Y="3.5940001" Z="0"/>
</c:Transform>
@@ -3942,7 +4042,7 @@
</c:Model>
<c:Transform>
<Position X="-40.5458374" Y="-0.729142785" Z="-45.7907982"/>
<Orientation X="4.93700027" Y="3.5" Z="1.37700009"/>
<Orientation X="4.93700027" Y="4.81200027" Z="1.37700009"/>
</c:Transform>
</Components>
<Children/>
@@ -4058,21 +4158,7 @@
<Orientation X="0" Y="1.93500006" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="2.53721571" Z="0"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
<Children/>
</Entity>
<Entity>
<Components>
@@ -4679,6 +4765,7 @@
<HomePointForTeam>
<Blue/>
</HomePointForTeam>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePoint>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
@@ -4714,7 +4801,7 @@
<Entity>
<Components>
<c:CapturePoint>
<CapturePointNumber>1</CapturePointNumber>
<CapturePointNumber>3</CapturePointNumber>
</c:CapturePoint>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
@@ -4779,7 +4866,7 @@
<Components>
<c:CapturePoint>
<CaptureTimer>1.5498908015879351</CaptureTimer>
<CapturePointNumber>3</CapturePointNumber>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePoint>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
@@ -4814,7 +4901,6 @@
<HomePointForTeam>
<Red/>
</HomePointForTeam>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePoint>
<c:Model>
<Resource>Models/Core/UnitCylinder.mesh</Resource>
@@ -4925,7 +5011,7 @@
<Components>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
<EntityFile>Schema/Entities/PlayerRed.xml</EntityFile>
</c:Spawner>
<c:Team>
<Team>
@@ -4933,7 +5019,7 @@
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="6.69097853" Z="0"/>
<Position X="-60.3695679" Y="2.14482641" Z="-79.3789597"/>
</c:Transform>
</Components>
<Children>
@@ -4942,9 +5028,10 @@
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="1" Y="0" Z="0"/>
<Position X="9.3347702" Y="2.70210314" Z="2.33294678"/>
</c:Transform>
</Components>
<Children/>
@@ -4954,9 +5041,10 @@
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-1" Y="0" Z="0"/>
<Position X="5.59104443" Y="2.14147282" Z="6.07936668"/>
</c:Transform>
</Components>
<Children/>
@@ -4966,9 +5054,10 @@
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0" Z="1"/>
<Position X="-2.2788806" Y="0" Z="3.17202592"/>
</c:Transform>
</Components>
<Children/>
@@ -4978,15 +5067,245 @@
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0" Z="-1"/>
<Position X="1.14053249" Y="0" Z="-1.67306876"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="SpawnerBlueTeam">
<Components>
<c:PlayerSpawn/>
<c:Spawner>
<EntityFile>Schema/Entities/Player.xml</EntityFile>
</c:Spawner>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:Transform>
<Position X="60.0169258" Y="2.37972379" Z="76.2893906"/>
</c:Transform>
</Components>
<Children>
<Entity name="SpawnPointRedTeam">
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="2.02889442" Y="0.194165871" Z="-1.17950201"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SpawnPointRedTeam">
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-9.04242706" Y="1.82531989" Z="-0.421615779"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SpawnPointRedTeam">
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="1.64179754" Y="0.634559035" Z="4.27690458"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SpawnPointRedTeam">
<Components>
<c:SpawnPoint/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-6.58577824" Y="1.97348273" Z="-2.86768818"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="HealthPickups">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:HealthPickup/>
<c:Model>
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="48.9189453" Y="7.06223536" Z="-78.9347992"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="71.4059677" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AmmoPickup/>
<c:Model>
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="-59.3499641" Y="7.46932745" Z="-20.6276321"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="68.0603104" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:HealthPickup/>
<c:Model>
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="-1.13644195" Y="1.38919806" Z="38.9768829"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="65.6683426" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:HealthPickup/>
<c:Model>
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="54.7225227" Y="6.51863909" Z="29.0052128"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="65.9822693" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AmmoPickup/>
<c:Model>
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="-51.6792374" Y="8.44526482" Z="32.5153465"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="65.4309921" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:HealthPickup/>
<c:Model>
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="-42.3974304" Y="7.28327894" Z="81.9305344"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="63.560215" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AmmoPickup/>
<c:Model>
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="-9.85184956" Y="8.25567532" Z="39.6119232"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="62.6090584" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:AmmoPickup/>
<c:Model>
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
</c:Model>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="49.2257118" Y="7.39368248" Z="-31.1810112"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="0" Y="59.8201942" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
+365 -52
View File
@@ -23,9 +23,7 @@
<Blue/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.0288832653" Z="2.64837074"/>
</c:Transform>
<c:Transform/>
</Components>
<Children>
@@ -37,20 +35,6 @@
</c:Transform>
</Components>
<Children>
<Entity name="PlayerName">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.100000001" Y="0.248000011" Z="-0.248000011"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="CameraModel">
<Components>
<c:Model>
@@ -71,25 +55,6 @@
</c:Transform>
</Components>
<Children>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Model>
<Resource>Models/Core/UnitHexagon.mesh</Resource>
<Color A="1" B="0.70588237" G="0.70588237" R="0.70588237"/>
</c:Model>
<c:Transform>
<Position X="-0.383000016" Y="-0.185000002" Z="0"/>
<Scale X="0.150000006" Y="0.150000006" Z="0.150000006"/>
<Orientation X="0" Y="0.594000041" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Crosshair">
<Components>
<c:Sprite>
@@ -112,17 +77,284 @@
</Components>
<Children/>
</Entity>
<Entity name="HealthHUD">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="HealthText">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="1" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Text>
<Content>100/100</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="0.505882382" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="-0.355000019" Y="-0.203000009" Z="0.0410000011"/>
<Scale X="0.0350000001" Y="0.0350000001" Z="0.0350000001"/>
<Orientation X="0" Y="0.410000026" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0.301960796" B="1" G="0" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:HealthHUD/>
<c:Transform>
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
<Orientation X="5.87300014" Y="0" Z="4.71200037"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="CapturePointHUD">
<Components>
<c:Transform>
<Position X="0" Y="0.190541431" Z="0"/>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>2</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0.811270177" Y="0.440691769" Z="-0.100000001"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>3</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Percentage>0.80222018197612788</Percentage>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="1.62788737" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-0.820431828" Y="0.441878349" Z="-0.100000001"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-1.58304751" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD/>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="KillFeed">
<Components>
<c:KillFeed/>
<c:Transform>
<Position X="0.486000031" Y="0.26000002" Z="0"/>
<Scale X="0.0149999997" Y="0.0149999997" Z="0.0149999997"/>
</c:Transform>
</Components>
<Children>
<Entity name="KillFeed1">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="KillFeed2">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="0" Y="-1" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="KillFeed3">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="0" Y="-2" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="Hands">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>0.1719161089749548</Time1>
<Time1>1.6050530664521858</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Color A="1" B="1" G="0.309803933" R="0"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
@@ -138,8 +370,8 @@
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.120747983" Y="-0.228997007" Z="-0.151475653"/>
<Orientation X="0.0104046585" Y="-0.00268164417" Z="0.0428441912"/>
<Position X="0.12043035" Y="-0.234149337" Z="-0.181454644"/>
<Orientation X="0.0104045281" Y="-0.00268131681" Z="0.0428438708"/>
</c:Transform>
</Components>
<Children>
@@ -154,17 +386,75 @@
</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:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
<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>
<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:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<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>
</Children>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponReloadEffect.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
@@ -187,7 +477,7 @@
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>1.8038469763698401</Time1>
<Time1>1.620305457513453</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:AnimationOffset>
@@ -209,11 +499,10 @@
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0.15859656" Y="1.02875519" Z="-0.21540691"/>
<Orientation X="-0.0626692101" Y="-0.0361935496" Z="0.120095037"/>
<Position X="0.160351232" Y="1.02591991" Z="-0.215102971"/>
<Orientation X="-0.0627480298" Y="-0.0432248674" Z="0.119431816"/>
</c:Transform>
</Components>
<Children>
@@ -228,6 +517,15 @@
</Components>
<Children/>
</Entity>
<Entity name="ThirdPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
@@ -259,6 +557,21 @@
</Components>
<Children/>
</Entity>
<Entity name="PlayerName">
<Components>
<c:Text>
<Content>Insert name here</Content>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.100000001" Y="1.50176644" Z="-0.248000011"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -2,9 +2,7 @@
<Entity name="Explosion" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Animation>
<Name>Hold Pos</Name>
</c:Animation>
<c:Animation/>
<c:Lifetime>
<Lifetime>2.5</Lifetime>
</c:Lifetime>
+577
View File
@@ -0,0 +1,577 @@
<?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">
<Components>
<c:AABB>
<Origin X="0" Y="0.772000015" Z="0"/>
<Size X="1" Y="1.60000002" Z="1"/>
</c:AABB>
<c:AssaultWeapon>
<RPM>600</RPM>
</c:AssaultWeapon>
<c:Collidable/>
<c:DashAbility/>
<c:Health/>
<c:Physics>
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
</c:Physics>
<c:Player>
<MovementSpeed>5</MovementSpeed>
</c:Player>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Transform/>
</Components>
<Children>
<Entity name="Camera">
<Components>
<c:Camera/>
<c:Transform>
<Position X="0" Y="1.27700007" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="CameraModel">
<Components>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.0331346765" Z="-0.0792061687"/>
<Scale X="1.30000007" Y="1.50000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HUD">
<Components>
<c:Transform>
<Position X="0" Y="0" Z="-0.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="Crosshair">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.200000003"/>
<Scale X="0.0250000004" Y="0.0250000004" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HitMarkerSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/HitMarker.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="HealthHUD">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="HealthText">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="1" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Text>
<Content>100/100</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="0.505882382" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="-0.355000019" Y="-0.203000009" Z="0.0410000011"/>
<Scale X="0.0350000001" Y="0.0350000001" Z="0.0350000001"/>
<Orientation X="0" Y="0.410000026" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0.301960796" B="1" G="0" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:HealthHUD/>
<c:Transform>
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
<Orientation X="5.87300014" Y="0" Z="4.71200037"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="CapturePointHUD">
<Components>
<c:Transform>
<Position X="0" Y="0.190541431" Z="0"/>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>2</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0.811270177" Y="0.440691769" Z="-0.100000001"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>3</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Percentage>0.80222018197612788</Percentage>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="1.62788737" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-0.820431828" Y="0.441878349" Z="-0.100000001"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-1.58304751" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD/>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="KillFeed">
<Components>
<c:KillFeed/>
<c:Transform>
<Position X="0.486000031" Y="0.26000002" Z="0"/>
<Scale X="0.0149999997" Y="0.0149999997" Z="0.0149999997"/>
</c:Transform>
</Components>
<Children>
<Entity name="KillFeed1">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="KillFeed2">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="0" Y="-1" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="KillFeed3">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="0" Y="-2" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="Hands">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>1.6050530664521858</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.12043035" Y="-0.234149337" Z="-0.181454644"/>
<Orientation X="0.0104045281" Y="-0.00268131681" Z="0.0428438708"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectViewRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
<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>
<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:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<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>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ThirdPersonCamera">
<Components>
<c:Camera/>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-0.284000009" Y="1.83800006" Z="1.18900001"/>
<Orientation X="5.95600033" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="PlayerModel">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>1.620305457513453</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:AnimationOffset>
<AnimationName>AimRifle</AnimationName>
<Time>0.5</Time>
</c:AnimationOffset>
<c:HiddenForLocalPlayer/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ThirdPersonWeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.160351232" Y="1.02591991" Z="-0.215102971"/>
<Orientation X="-0.0627480298" Y="-0.0432248674" Z="0.119431816"/>
</c:Transform>
</Components>
<Children>
<Entity name="ThirdPersonWeaponMuzzle">
<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/ReloadEffectWorldRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="AABBStanding">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.427450985" B="1" G="1" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
<Scale X="1" Y="1.60000002" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AABBCrouching">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.745098054" B="1" G="0" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="PlayerName">
<Components>
<c:Text>
<Content>Insert name here</Content>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.100000001" Y="1.50199997" Z="-0.248000011"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+3 -3
View File
@@ -6,12 +6,12 @@
<Lifetime>0.25</Lifetime>
</c:Lifetime>
<c:Model>
<Resource>Models/Weapons/CylinderBullet.mesh</Resource>
<Color A="0.156862751" B="0" G="0.525490224" R="39.2156868"/>
<Resource>Models/Effects/CylinderShot.mesh</Resource>
<Color A="0.149019614" B="0" G="0" R="39.2156868"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Scale X="0.0110000009" Y="0.029000001" Z="100"/>
<Scale X="0.0690000057" Y="0.0690000057" Z="100"/>
</c:Transform>
</Components>
@@ -2,9 +2,6 @@
<Entity name="WeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Lifetime>
<Lifetime>2</Lifetime>
</c:Lifetime>
@@ -18,12 +15,8 @@
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.120747991" Y="-0.229502052" Z="-0.151475638"/>
<Orientation X="0.0104046296" Y="-0.00268167513" Z="0.0428442545"/>
</c:Transform>
<c:Transform/>
</Components>
<Children/>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="WeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>2</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance>
<Velocity X="3.33300018" Y="0.0320000015" Z="0"/>
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/>
<ExponentialAccelaration>true</ExponentialAccelaration>
<EndColor A="0" B="1" G="1" R="19.6078434"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="WeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>2</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance>
<Velocity X="1.63300014" Y="0.0320000015" Z="0"/>
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/>
<ExponentialAccelaration>true</ExponentialAccelaration>
<EndColor A="0" B="19.6078434" G="19.6078434" R="0"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="WeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>2</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance>
<Velocity X="1.63300014" Y="0.0320000015" Z="0"/>
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/>
<ExponentialAccelaration>true</ExponentialAccelaration>
<EndColor A="0" B="1" G="1" R="19.6078434"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<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>
+4
View File
@@ -43,6 +43,10 @@
<xs:element ref="c:Shield" minOccurs="0"/>
<xs:element ref="c:Shielded" minOccurs="0"/>
<xs:element ref="c:CapturePointHUD" minOccurs="0"/>
<xs:element ref="c:AmmunitionHUD" minOccurs="0"/>
<xs:element ref="c:KillFeed" minOccurs="0"/>
<xs:element ref="c:Sprite" minOccurs="0"/>
<xs:element ref="c:AnimationOffset" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
+1
View File
@@ -40,6 +40,7 @@ EditorSystem::EditorSystem(SystemParams params, IRenderer* renderer, RenderFrame
m_EditorStats = new EditorStats();
m_Enabled = ResourceManager::Load<ConfigFile>("Config.ini")->Get<bool>("Debug.EditorEnabled", false);
if (m_Enabled) {
Enable();
}
+106 -20
View File
@@ -41,9 +41,11 @@ void Client::Connect(std::string address, int port)
}
}
void Client::Update()
void Client::Update(double dt)
{
m_EventBroker->Process<Client>();
//m_TimeStamp += dt;
publishInputCommands();
while (m_Unreliable.IsSocketAvailable()) {
// Packet will get real data in receive
Packet packet(MessageType::Invalid);
@@ -72,7 +74,8 @@ void Client::Update()
sendInputCommands();
m_TimeSinceSentInputs = std::clock();
}
// HACK: Send absolute player positions for now to avoid desync until we have reliable messages
// HACK: Send absolute player positions for now to avoid desync until we have reliable messages.
// Reliable messages and timestamps did not fix it.
sendLocalPlayerTransform();
hasServerTimedOut();
@@ -119,6 +122,12 @@ void Client::parseMessageType(Packet& packet)
case MessageType::ComponentDeleted:
parseComponentDeletion(packet);
break;
case MessageType::OnPlayerDamage:
parsePlayerDamage(packet);
break;
case MessageType::OnInputCommand:
//parsePlayerDamage(packet);
break;
default:
break;
}
@@ -181,14 +190,13 @@ void Client::parseSpawnEvents()
std::vector<Events::PlayerSpawned> tempSpawn;
for (int i = 0; i < m_PlayerSpawnEvents.size(); i++) {
Events::PlayerSpawned e;
if (!serverClientMapsHasEntity(m_PlayerSpawnEvents.at(i).Player.ID) ||
!serverClientMapsHasEntity(m_PlayerSpawnEvents.at(i).Spawner.ID)) {
if (!serverClientMapsHasEntity(m_PlayerSpawnEvents.at(i).Player.ID)) {
tempSpawn.push_back(m_PlayerSpawnEvents.at(i));
continue;
}
e.Player = EntityWrapper(m_World, m_ServerIDToClientID.at(m_PlayerSpawnEvents.at(i).Player.ID));
e.Spawner = EntityWrapper(m_World, m_ServerIDToClientID.at(m_PlayerSpawnEvents.at(i).Spawner.ID));
e.PlayerID = -1;
//e.Spawner = EntityWrapper(m_World, m_ServerIDToClientID.at(m_PlayerSpawnEvents.at(i).Spawner.ID));
e.PlayerID = -1;
e.PlayerName = m_PlayerSpawnEvents.at(i).PlayerName;
m_EventBroker->Publish(e);
}
@@ -282,17 +290,30 @@ void Client::ignoreFields(Packet& packet, const ComponentInfo& componentInfo)
void Client::parseSnapshot(Packet& packet)
{
// Read input commands
std::size_t numInputCommands = packet.ReadPrimitive<std::size_t>();
for (std::size_t i = 0; i < numInputCommands; ++i) {
Events::InputCommand e;
e.PlayerID = packet.ReadPrimitive<EntityID>();
EntityID player = packet.ReadPrimitive<EntityID>();
e.Player = EntityWrapper(m_World, m_ServerIDToClientID.at(player));
e.Command = packet.ReadString();
e.Value = packet.ReadPrimitive<float>();
m_EventBroker->Publish(e);
}
//// Read input commands
//std::size_t numInputCommands = packet.ReadPrimitive<std::size_t>();
//for (std::size_t i = 0; i < numInputCommands; ++i) {
// Events::InputCommand e;
// e.PlayerID = packet.ReadPrimitive<EntityID>();
// EntityID player = packet.ReadPrimitive<EntityID>();
// std::string command = packet.ReadString();
// float value = packet.ReadPrimitive<float>();
// double timestamp = packet.ReadPrimitive<double>();
// if (m_ServerIDToClientID.find(player) != m_ServerIDToClientID.end()) {
// e.Player = EntityWrapper(m_World, m_ServerIDToClientID.at(player));
// e.Command = command;
// e.Value = value;
// e.TimeStamp = timestamp;
// m_EventBroker->Publish(e);
// }
//}
// Read timestamp
double remoteTimestamp = packet.ReadPrimitive<double>();
//if (abs(remoteTimestamp - m_TimeStamp) > 0.100) {
// m_TimeStamp = remoteTimestamp;
// LOG_INFO("Resynced remote and local timestamp");
//}
// Read world state
while (packet.DataReadSize() < packet.Size()) {
@@ -353,6 +374,36 @@ void Client::parseSnapshot(Packet& packet)
parseSpawnEvents();
}
void Client::parseOnInputCommand(Packet & packet)
{
while (packet.DataReadSize() < packet.Size()) {
Events::InputCommand e;
e.PlayerID = packet.ReadPrimitive<int>();
e.Player = EntityWrapper(m_World, packet.ReadPrimitive<int>());
e.Command = packet.ReadString();
e.Value = packet.ReadPrimitive<float>();
e.TimeStamp = packet.ReadPrimitive<double>();
m_EventBroker->Publish(e);
m_ReceivedInputCommands.push_back(e);
//LOG_INFO("Server::parseOnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID);
}
}
void Client::publishInputCommands()
{
std::vector<Events::InputCommand> notPublishedEvents;
for (int i = 0; i < m_ReceivedInputCommands.size(); i++) {
if (m_ReceivedInputCommands.at(i).TimeStamp < m_TimeStamp) {
m_EventBroker->Publish(m_ReceivedInputCommands.at(i));
}
else {
notPublishedEvents.push_back(m_ReceivedInputCommands.at(i));
}
}
m_ReceivedInputCommands = notPublishedEvents;
}
void Client::disconnect()
{
m_IsConnected = false;
@@ -396,7 +447,9 @@ bool Client::OnInputCommand(const Events::InputCommand & e)
}
} else {
if (m_IsConnected) {
m_InputCommandBuffer.push_back(e);
Events::InputCommand setTimestamp = e;
setTimestamp.TimeStamp = m_TimeStamp;
m_InputCommandBuffer.push_back(setTimestamp);
}
//LOG_DEBUG("Client::OnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID);
return true;
@@ -406,12 +459,17 @@ bool Client::OnInputCommand(const Events::InputCommand & e)
bool Client::OnPlayerDamage(const Events::PlayerDamage & e)
{
if (e.Inflictor != m_LocalPlayer) {
return false;
}
Packet packet(MessageType::OnPlayerDamage, m_SendPacketID);
packet.WritePrimitive(m_ClientIDToServerID.at(e.Inflictor.ID));
packet.WritePrimitive(m_ClientIDToServerID.at(e.Victim.ID));
packet.WritePrimitive(e.Damage);
m_Reliable.Send(packet);
return false;
return true;
}
bool Client::OnPlayerSpawned(const Events::PlayerSpawned& e)
@@ -422,22 +480,49 @@ bool Client::OnPlayerSpawned(const Events::PlayerSpawned& e)
return true;
}
void Client::parsePlayerDamage(Packet& packet)
{
Events::PlayerDamage e;
PlayerID victimID = packet.ReadPrimitive<EntityID>();
PlayerID inflictorID = packet.ReadPrimitive<EntityID>();
if(!serverClientMapsHasEntity(victimID) || !serverClientMapsHasEntity(inflictorID)){
return;
}
e.Inflictor = EntityWrapper(m_World, m_ServerIDToClientID.at(victimID));
e.Victim = EntityWrapper(m_World, m_ServerIDToClientID.at(inflictorID));
e.Damage = packet.ReadPrimitive<double>();
// Don't rebroadcast our own player damage events or we'll have an infinite loop!
if (e.Inflictor != m_LocalPlayer) {
m_EventBroker->Publish(e);
}
}
void Client::sendLocalPlayerTransform()
{
if (!m_LocalPlayer.Valid()) {
return;
}
Packet packet(MessageType::PlayerTransform, m_SendPacketID);
ComponentWrapper cTransform = m_LocalPlayer["Transform"];
glm::vec3& position = cTransform["Position"];
glm::vec3& orientation = cTransform["Orientation"];
Packet packet(MessageType::PlayerTransform, m_SendPacketID);
packet.WritePrimitive(position.x);
packet.WritePrimitive(position.y);
packet.WritePrimitive(position.z);
packet.WritePrimitive(orientation.x);
packet.WritePrimitive(orientation.y);
packet.WritePrimitive(orientation.z);
bool hasAssaultWeapon = m_LocalPlayer.HasComponent("AssaultWeapon");
packet.WritePrimitive(hasAssaultWeapon);
if (hasAssaultWeapon) {
ComponentWrapper cAssaultWeapon = m_LocalPlayer["AssaultWeapon"];
packet.WritePrimitive((int)cAssaultWeapon["MagazineAmmo"]);
packet.WritePrimitive((int)cAssaultWeapon["Ammo"]);
}
m_Unreliable.Send(packet);
}
@@ -478,6 +563,7 @@ void Client::sendInputCommands()
for (int i = 0; i < m_InputCommandBuffer.size(); i++) {
packet.WriteString(m_InputCommandBuffer[i].Command);
packet.WritePrimitive(m_InputCommandBuffer[i].Value);
packet.WritePrimitive(m_InputCommandBuffer[i].TimeStamp);
}
m_Reliable.Send(packet);
m_InputCommandBuffer.clear();
+1 -1
View File
@@ -9,7 +9,7 @@ Network::Network(World* world, EventBroker* eventBroker)
m_TimeoutMs = config->Get<int>("Networking.TimeoutMs", 20000);
}
void Network::Update()
void Network::Update(double dt)
{
updateNetworkData();
}
+77 -18
View File
@@ -1,6 +1,6 @@
#include "Network/Server.h"
Server::Server(World* world, EventBroker* eventBroker, int port)
Server::Server(World* world, EventBroker* eventBroker, int port)
: Network(world, eventBroker)
{
ConfigFile* config = ResourceManager::Load<ConfigFile>("Config.ini");
@@ -11,6 +11,7 @@ Server::Server(World* world, EventBroker* eventBroker, int port)
EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &Server::OnPlayerSpawned);
EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &Server::OnEntityDeleted);
EVENT_SUBSCRIBE_MEMBER(m_EComponentDeleted, &Server::OnComponentDeleted);
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDamage, &Server::OnPlayerDamage);
// Bind
if (port == 0) {
@@ -25,10 +26,12 @@ Server::~Server()
}
void Server::Update()
void Server::Update(double dt)
{
m_EventBroker->Process<Server>();
m_TimeStamp += dt;
publishInputCommands();
PlayerDefinition pd;
m_Reliable.AcceptNewConnections(m_NextPlayerID, m_ConnectedPlayers);
for (auto& kv : m_ConnectedPlayers) {
while (kv.second.TCPSocket->available()) {
@@ -79,11 +82,9 @@ void Server::Update()
checkForTimeOuts();
timOutTimer = currentTime;
}
m_EventBroker->Process<Server>();
if (isReadingData) {
Network::Update();
Network::Update(dt);
}
}
void Server::parseMessageType(Packet& packet)
@@ -145,7 +146,8 @@ void Server::unreliableBroadcast(Packet& packet)
void Server::sendSnapshot()
{
Packet packet(MessageType::Snapshot);
addInputCommandsToPacket(packet);
//addInputCommandsToPacket(packet);
packet.WritePrimitive(m_TimeStamp/*+ somePingvalue + offset*/);
addChildrenToPacket(packet, EntityID_Invalid);
unreliableBroadcast(packet);
}
@@ -159,6 +161,7 @@ void Server::addInputCommandsToPacket(Packet& packet)
packet.WritePrimitive(m_ConnectedPlayers.at(command.PlayerID).EntityID);
packet.WriteString(command.Command);
packet.WritePrimitive(command.Value);
packet.WritePrimitive(command.TimeStamp);
}
m_InputCommandsToBroadcast.clear();
}
@@ -170,6 +173,12 @@ void Server::addChildrenToPacket(Packet & packet, EntityID entityID)
// Loop through every child
for (auto it = itPair.first; it != itPair.second; it++) {
EntityID childEntityID = it->second;
// HACK: Only sync players for now, since the map turned out to be TOO LARGE to send in one snapshot and Simon's computer shits itself
EntityWrapper childEntity(m_World, childEntityID);
if (!shouldSendToClient(childEntity)) {
continue;
}
// Write EntityID and parentsID and Entity name
packet.WritePrimitive(childEntityID);
packet.WritePrimitive(entityID);
@@ -273,7 +282,7 @@ void Server::parseTCPConnect(Packet & packet)
// Read packet ID
m_PreviousPacketID = m_PacketID; // Set previous packet id
m_PacketID = packet.ReadPrimitive<int>(); //Read new packet id
LOG_INFO("Parsing connections");
// Check if player is already connected
// Ska vara till lagd i TCPServer receive
@@ -326,8 +335,10 @@ void Server::disconnect(PlayerID playerID)
e.PlayerID = playerID;
m_EventBroker->Publish(e);
//m_World->DeleteEntity(m_ConnectedPlayers[playerID].EntityID);
// TODO Kolla Anders crashade efter timeout med break point
m_ConnectedPlayers[playerID].TCPSocket->shutdown(boost::asio::ip::tcp::socket::shutdown_both);
m_ConnectedPlayers[playerID].TCPSocket->close();
m_World->DeleteEntity(m_ConnectedPlayers[playerID].EntityID);
m_ConnectedPlayers.erase(playerID);
// Send disconnect to the other players.
}
@@ -367,8 +378,7 @@ bool Server::OnInputCommand(const Events::InputCommand & e)
}
isReadingData = !isReadingData;
m_SaveDataTimer = std::clock();
}
if (e.Command == "KickPlayer" && e.Value > 0) {
} else if (e.Command == "KickPlayer" && e.Value > 0) {
kick(0);
}
@@ -401,14 +411,26 @@ bool Server::OnEntityDeleted(const Events::EntityDeleted & e)
bool Server::OnComponentDeleted(const Events::ComponentDeleted & e)
{
if (!e.Cascaded) {
Packet packet = Packet(MessageType::ComponentDeleted);
packet.WritePrimitive<EntityID>(e.Entity);
packet.WriteString(e.ComponentType);
reliableBroadcast(packet);
if (shouldSendToClient(EntityWrapper(m_World, e.Entity))) {
Packet packet = Packet(MessageType::ComponentDeleted);
packet.WritePrimitive<EntityID>(e.Entity);
packet.WriteString(e.ComponentType);
reliableBroadcast(packet);
}
}
return false;
}
bool Server::OnPlayerDamage(const Events::PlayerDamage& e)
{
Packet packet(MessageType::OnPlayerDamage);
packet.WritePrimitive(e.Inflictor.ID);
packet.WritePrimitive(e.Victim.ID);
packet.WritePrimitive(e.Damage);
reliableBroadcast(packet);
return false;
}
void Server::parseClientPing()
{
@@ -446,8 +468,10 @@ void Server::parseOnInputCommand(Packet& packet)
e.PlayerID = player; // Set correct player id
e.Player = EntityWrapper(m_World, m_ConnectedPlayers.at(player).EntityID);
e.Value = packet.ReadPrimitive<float>();
m_EventBroker->Publish(e);
if (e.Command == "PrimaryFire") {
e.TimeStamp = packet.ReadPrimitive<double>();
/* m_EventBroker->Publish(e);*/
m_InputCommandsToPublish.push_back(e);
if (e.Command == "PrimaryFire" || e.Command == "Reload") {
m_InputCommandsToBroadcast.push_back(e);
}
//LOG_INFO("Server::parseOnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID);
@@ -457,6 +481,11 @@ void Server::parseOnInputCommand(Packet& packet)
void Server::parsePlayerTransform(Packet& packet)
{
PlayerID playerID = GetPlayerIDFromEndpoint();
if (playerID == -1) {
return;
}
glm::vec3 position;
glm::vec3 orientation;
position.x = packet.ReadPrimitive<float>();
@@ -466,15 +495,45 @@ void Server::parsePlayerTransform(Packet& packet)
orientation.y = packet.ReadPrimitive<float>();
orientation.z = packet.ReadPrimitive<float>();
PlayerID playerID = GetPlayerIDFromEndpoint();
EntityWrapper player(m_World, m_ConnectedPlayers.at(playerID).EntityID);
bool hasAssaultWeapon = packet.ReadPrimitive<bool>();
int magazineAmmo;
int ammo;
if (hasAssaultWeapon) {
magazineAmmo = packet.ReadPrimitive<int>();
ammo = packet.ReadPrimitive<int>();
}
EntityWrapper player(m_World, m_ConnectedPlayers.at(playerID).EntityID);
if (player.Valid()) {
player["Transform"]["Position"] = position;
player["Transform"]["Orientation"] = orientation;
if (hasAssaultWeapon) {
player["AssaultWeapon"]["MagazineAmmo"] = magazineAmmo;
player["AssaultWeapon"]["Ammo"] = ammo;
}
}
}
bool Server::shouldSendToClient(EntityWrapper childEntity)
{
return childEntity.HasComponent("Player") || childEntity.FirstParentWithComponent("Player").Valid();
}
void Server::publishInputCommands()
{
std::vector<Events::InputCommand> notPublishedEvents;
for (int i = 0; i < m_InputCommandsToPublish.size(); i++) {
if (m_InputCommandsToPublish.at(i).TimeStamp < m_TimeStamp) {
m_EventBroker->Publish(m_InputCommandsToPublish.at(i));
} else {
LOG_INFO("Did not instantly publish command");
notPublishedEvents.push_back(m_InputCommandsToPublish.at(i));
}
}
m_InputCommandsToPublish = notPublishedEvents;
}
PlayerID Server::GetPlayerIDFromEndpoint()
{
// check both tcp and udp connection
+5 -2
View File
@@ -79,7 +79,6 @@ void RenderSystem::fillSprites(std::list<std::shared_ptr<RenderJob>>& jobs, Worl
bool RenderSystem::isEntityVisible(EntityWrapper& entity)
{
// Only render children of a camera if that camera is currently active
if (isChildOfACamera(entity) && !isChildOfCurrentCamera(entity)) {
return false;
@@ -87,7 +86,11 @@ bool RenderSystem::isEntityVisible(EntityWrapper& entity)
// Hide things parented to local player if they have the HiddenFromLocalPlayer component
bool outOfBodyExperience = ResourceManager::Load<ConfigFile>("Config.ini")->Get<bool>("Debug.OutOfBodyExperience", false);
if (entity.HasComponent("HiddenForLocalPlayer") && (entity == m_LocalPlayer || entity.IsChildOf(m_LocalPlayer)) && !outOfBodyExperience) {
if (
(entity.HasComponent("HiddenForLocalPlayer") || entity.FirstParentWithComponent("HiddenForLocalPlayer").Valid())
&& (entity == m_LocalPlayer || entity.IsChildOf(m_LocalPlayer))
&& !outOfBodyExperience
) {
return false;
}
+1
View File
@@ -168,6 +168,7 @@ void Renderer::SortRenderJobsByDepth(RenderScene &scene)
//Sort all forward jobs so transparency is good.
scene.Jobs.TransparentObjects.sort(Renderer::DepthSort);
scene.Jobs.SpriteJob.sort(Renderer::DepthSort);
scene.Jobs.Text.sort(Renderer::DepthSort);
}
void Renderer::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type)
-5
View File
@@ -121,7 +121,6 @@ void Skeleton::AccumulateBoneTransforms(bool noRootMotion, std::vector<Animation
if (progress > 1.0f || progress < 0.0f) {
LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
@@ -241,7 +240,6 @@ void Skeleton::AccumulateBoneTransforms(bool noRootMotion, std::vector<Animation
if (progress > 1.0f || progress < 0.0f) {
LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
@@ -489,7 +487,6 @@ glm::mat4 Skeleton::GetBoneTransform(bool noRootMotion, const Bone* bone, std::v
if (progress > 1.0f || progress < 0.0f) {
LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
@@ -609,12 +606,10 @@ glm::mat4 Skeleton::GetBoneTransform(bool noRootMotion, const Bone* bone, std::v
progress = (time - currentFrame.Time) / (animation->Duration - currentFrame.Time);
} else {
progress = (time - currentFrame.Time) / (nextFrame.Time - currentFrame.Time);
}
if (progress > 1.0f || progress < 0.0f) {
LOG_INFO("Progress: %f", progress);
progress = glm::clamp(progress, 0.0f, 1.0f);
}
Animation::Keyframe::BoneProperty currentBoneProperty = currentFrame.BoneProperties;
+1
View File
@@ -36,6 +36,7 @@ source_group(Network FILES ${SOURCE_FILES_Network})
set(SOURCE_FILES
${SOURCE_FILES}
"Game.cpp"
"MiniDump.cpp"
${SOURCE_FILES_Systems}
${SOURCE_FILES_Systems_Weapon}
${SOURCE_FILES_Events}
+9 -4
View File
@@ -18,12 +18,15 @@
#include "Game/Systems/DamageIndicatorSystem.h"
#include "Game/Systems/Weapon/WeaponSystem.h"
#include "Rendering/AnimationSystem.h"
#include "Game/Systems/PlayerHUDSystem.h"
#include "Game/Systems/HealthHUDSystem.h"
#include "Rendering/BoneAttachmentSystem.h"
#include "Game/Systems/LifetimeSystem.h"
#include "../Engine/Core/UniformScaleSystem.h"
#include "Rendering/AnimationSystem.h"
#include "Network/MultiplayerSnapshotFilter.h"
#include "Game/Systems/AmmunitionHUDSystem.h"
#include "Game/Systems/KillFeedSystem.h"
Game::Game(int argc, char* argv[])
{
@@ -127,6 +130,8 @@ Game::Game(int argc, char* argv[])
m_SystemPipeline->AddSystem<PickupSpawnSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<AmmoPickupSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<DamageIndicatorSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<AmmunitionHUDSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<KillFeedSystem>(updateOrderLevel);
// Populate Octree with collidables
++updateOrderLevel;
m_SystemPipeline->AddSystem<FillOctreeSystem>(updateOrderLevel, m_OctreeCollision, "Collidable");
@@ -134,8 +139,8 @@ Game::Game(int argc, char* argv[])
m_SystemPipeline->AddSystem<FillFrustumOctreeSystem>(updateOrderLevel, m_OctreeFrustrumCulling);
m_SystemPipeline->AddSystem<AnimationSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<UniformScaleSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<HealthHUDSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<PlayerDeathSystem>(updateOrderLevel);
m_SystemPipeline->AddSystem<PlayerHUDSystem>(updateOrderLevel);
// Collision and TriggerSystem should update after player.
++updateOrderLevel;
m_SystemPipeline->AddSystem<BoneAttachmentSystem>(updateOrderLevel);
@@ -194,10 +199,10 @@ void Game::Tick()
// Update network
m_EventBroker->Process<MultiplayerSnapshotFilter>();
if (m_NetworkClient != nullptr) {
m_NetworkClient->Update();
m_NetworkClient->Update(dt);
}
if (m_NetworkServer != nullptr) {
m_NetworkServer->Update();
m_NetworkServer->Update(dt);
}
//m_SoundManager->Update(dt);
+110
View File
@@ -0,0 +1,110 @@
/*
Author: Vladimir Sedach.
Purpose: demo of Call Stack creation by our own means,
and with MiniDumpWriteDump() function of DbgHelp.dll.
*/
#include <iostream>
#include <ctime>
#include <windows.h>
#include <tlhelp32.h>
//#include "dbghelp.h"
//#define DEBUG_DPRINTF 1 //allow d()
//#include "wfun.h"
#pragma optimize("y", off) //generate stack frame pointers for all functions - same as /Oy- in the project
#pragma warning(disable: 4200) //nonstandard extension used : zero-sized array in struct/union
#pragma warning(disable: 4100) //unreferenced formal parameter
// In case you don't have dbghelp.h.
#ifndef _DBGHELP_
typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
DWORD ThreadId;
PEXCEPTION_POINTERS ExceptionPointers;
BOOL ClientPointers;
} MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
typedef enum _MINIDUMP_TYPE {
MiniDumpNormal = 0x00000000,
MiniDumpWithDataSegs = 0x00000001,
} MINIDUMP_TYPE;
typedef BOOL (WINAPI * MINIDUMP_WRITE_DUMP)(
IN HANDLE hProcess,
IN DWORD ProcessId,
IN HANDLE hFile,
IN MINIDUMP_TYPE DumpType,
IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL
IN PVOID UserStreamParam, OPTIONAL
IN PVOID CallbackParam OPTIONAL
);
#else
typedef BOOL (WINAPI * MINIDUMP_WRITE_DUMP)(
IN HANDLE hProcess,
IN DWORD ProcessId,
IN HANDLE hFile,
IN MINIDUMP_TYPE DumpType,
IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL
IN PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, OPTIONAL
IN PMINIDUMP_CALLBACK_INFORMATION CallbackParam OPTIONAL
);
#endif //#ifndef _DBGHELP_
HMODULE hDbgHelp;
MINIDUMP_WRITE_DUMP MiniDumpWriteDump_;
// Tool Help functions.
typedef HANDLE (WINAPI * CREATE_TOOL_HELP32_SNAPSHOT)(DWORD dwFlags, DWORD th32ProcessID);
//*************************************************************************************
void WINAPI Create_Dump(PEXCEPTION_POINTERS pException, BOOL File_Flag, BOOL Show_Flag)
//*************************************************************************************
// Create dump.
// pException can be either GetExceptionInformation() or NULL.
// If File_Flag = TRUE - write dump files (.dmz and .dmp) with the name of the current process.
// If Show_Flag = TRUE - show message with Get_Exception_Info() dump.
{
// Try to get MiniDumpWriteDump() address.
hDbgHelp = LoadLibrary("DBGHELP.DLL");
MiniDumpWriteDump_ = (MINIDUMP_WRITE_DUMP)GetProcAddress(hDbgHelp, "MiniDumpWriteDump");
// If MiniDumpWriteDump() of DbgHelp.dll available.
if (MiniDumpWriteDump_)
{
HANDLE hDump_File;
CHAR Dump_Path[MAX_PATH];
GetModuleFileName(NULL, Dump_Path, sizeof(Dump_Path)); //path of current process
std::time_t t = std::time(NULL);
char tStr[16];
std::strftime(tStr, 32, " %a %H-%M-%S", std::localtime(&t));
std::string time(tStr);
std::string path(Dump_Path);
path = path.substr(0, path.length() - 4);
path += time + ".dmp";
MINIDUMP_EXCEPTION_INFORMATION M;
M.ThreadId = GetCurrentThreadId();
M.ExceptionPointers = pException;
M.ClientPointers = 0;
hDump_File = CreateFile(path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
MiniDumpWriteDump_(GetCurrentProcess(), GetCurrentProcessId(), hDump_File,
MiniDumpNormal, (pException) ? &M : NULL, NULL, NULL);
CloseHandle(hDump_File);
std::cout << "Memory dumped to: \"" << path.c_str() << "\"";
MessageBox(NULL, ("Application crashed, memory dumped to: " + path).c_str(), "MiniDump", MB_ICONHAND | MB_OK);
} else {
MessageBox(NULL, "Application crashed, memory dump failed.", "MiniDump", MB_ICONHAND | MB_OK);
}
}
+10 -1
View File
@@ -9,7 +9,16 @@ MultiplayerSnapshotFilter::MultiplayerSnapshotFilter(EventBroker* eventBroker)
bool MultiplayerSnapshotFilter::FilterComponent(EntityWrapper entity, SharedComponentWrapper& component)
{
if (entity == m_LocalPlayer || entity.IsChildOf(m_LocalPlayer)) {
return false;
if (
component.Info.Name == "Transform"
|| component.Info.Name == "Physics"
|| component.Info.Name == "AssaultWeapon"
|| component.Info.Name == "Animation"
|| component.Info.Name == "AnimationOffset"
|| entity.Name() == "PlayerName"
) {
return false;
}
}
if (component.Info.Name == "Physics") {
+36
View File
@@ -0,0 +1,36 @@
#include "Game/Systems/AmmunitionHUDSystem.h"
void AmmunitionHUDSystem::Update(double dt)
{
//Hud element for tracking ammunition from parent with AssaultWeapon component.Child with the name "MagazineAmmo" tracks clip ammunition.Child with the name "Ammo" tracks ammo.</xs:documentation>
auto ammunitionHUDs = m_World->GetComponents("AmmunitionHUD");
if (ammunitionHUDs == nullptr) {
return;
}
for (auto& ammunitionHUDComponent : *ammunitionHUDs) {
EntityWrapper entity = EntityWrapper(m_World, ammunitionHUDComponent.EntityID);
EntityWrapper playerEntity = entity.FirstParentWithComponent("AssaultWeapon");
if (!playerEntity.Valid()) {
return;
}
EntityWrapper magazineAmmo = entity.FirstChildByName("MagazineAmmo");
if(magazineAmmo.Valid()) {
if(magazineAmmo.HasComponent("Text")) {
(std::string&)magazineAmmo["Text"]["Content"] = std::to_string((int)playerEntity["AssaultWeapon"]["MagazineAmmo"]);
}
}
EntityWrapper ammo = entity.FirstChildByName("Ammo");
if (ammo.Valid()) {
if (ammo.HasComponent("Text")) {
(std::string&)ammo["Text"]["Content"] = std::to_string((int)playerEntity["AssaultWeapon"]["Ammo"]);
}
}
}
}
@@ -20,6 +20,10 @@ void CapturePointHUDSystem::Update(double dt)
return;
}
if(!CapturePointHUDElements) {
return;
}
for (auto& cCapturePointHUD : *CapturePointHUDElements) {
int HUD_ID = cCapturePointHUD["CapturePointNumber"];
EntityWrapper entityHUD = EntityWrapper(m_World, cCapturePointHUD.EntityID);
+9 -3
View File
@@ -6,15 +6,21 @@ CapturePointSystem::CapturePointSystem(SystemParams params)
, PureSystem("CapturePoint")
{
//subscribe/listenTo playerdamage,healthpickup events (using the eventBroker)
EVENT_SUBSCRIBE_MEMBER(m_ETriggerTouch, &CapturePointSystem::OnTriggerTouch);
EVENT_SUBSCRIBE_MEMBER(m_ETriggerLeave, &CapturePointSystem::OnTriggerLeave);
EVENT_SUBSCRIBE_MEMBER(m_ECaptured, &CapturePointSystem::OnCaptured);
if (IsClient) {
EVENT_SUBSCRIBE_MEMBER(m_ETriggerTouch, &CapturePointSystem::OnTriggerTouch);
EVENT_SUBSCRIBE_MEMBER(m_ETriggerLeave, &CapturePointSystem::OnTriggerLeave);
EVENT_SUBSCRIBE_MEMBER(m_ECaptured, &CapturePointSystem::OnCaptured);
}
}
//here all capturepoints will update their component
//NOTE: needs to run each frame, since we're possibly modifying the captureTimer for the capturePoints by dt
void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, ComponentWrapper& cCapturePoint, double dt)
{
if (!IsClient) {
return;
}
if (m_WinnerWasFound) {
return;
}
+5 -2
View File
@@ -18,12 +18,15 @@ bool DamageIndicatorSystem::OnPlayerDamage(Events::PlayerDamage& e)
return false;
}
if (e.Victim != LocalPlayer) {
//if (e.Victim != LocalPlayer) {
// return false;
//}
if (e.Victim.Valid() && e.Victim != LocalPlayer && !e.Victim.IsChildOf(LocalPlayer)) {
return false;
}
if (!e.Inflictor.Valid() || !e.Victim.Valid()) {
return false;
return false;
}
//grab players direction
@@ -1,6 +1,6 @@
#include "Game/Systems/PlayerHUDSystem.h"
#include "Game/Systems/HealthHUDSystem.h"
void PlayerHUDSystem::Update(double dt)
void HealthHUDSystem::Update(double dt)
{
auto healthHUDs = m_World->GetComponents("HealthHUD");
if (healthHUDs == nullptr) {
@@ -27,13 +27,13 @@ void PlayerHUDSystem::Update(double dt)
s = s + "/";
s = s + std::to_string((int)(double)entityIDParent["Health"]["MaxHealth"]);
float healthPercentage = (double)entityIDParent["Health"]["Health"]/(double)entityIDParent["Health"]["MaxHealth"];
(glm::vec4&)entity["Text"]["Color"] = glm::vec4(1.0 - healthPercentage, 0.f, healthPercentage, 1.f);
//(glm::vec4&)entity["Text"]["Color"] = glm::vec4(1.0 - healthPercentage, 0.f, healthPercentage, glm::vec4(entity["Text"]["Color"]).a);
entity["Text"]["Content"] = s;
}
if(entity.HasComponent("Fill")) {
float healthPercentage = (double)entityIDParent["Health"]["Health"]/(double)entityIDParent["Health"]["MaxHealth"];
(glm::vec4&)entity["Fill"]["Color"] = glm::vec4(1.0 - healthPercentage, 0.f, healthPercentage, 0.f);
(glm::vec4&)entity["Fill"]["Color"] = glm::vec4(1.0 - healthPercentage, 0.f, healthPercentage, glm::vec4(entity["Fill"]["Color"]).a);
(double&)entity["Fill"]["Percentage"] = healthPercentage;
}
+14 -8
View File
@@ -8,25 +8,30 @@ HealthSystem::HealthSystem(SystemParams params)
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDamage, &HealthSystem::OnPlayerDamaged);
EVENT_SUBSCRIBE_MEMBER(m_EPlayerHealthPickup, &HealthSystem::OnPlayerHealthPickup);
EVENT_SUBSCRIBE_MEMBER(m_InputCommand, &HealthSystem::OnInputCommand);
m_NetworkEnabled = ResourceManager::Load<ConfigFile>("Config.ini")->Get("Networking.StartNetwork", false);
}
void HealthSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt)
void HealthSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cHealth, double dt)
{
double& health = cHealth["Health"];
if (health <= 0.0) {
Events::PlayerDeath ePlayerDeath;
ePlayerDeath.Player = entity;
m_EventBroker->Publish(ePlayerDeath);
//Note: we will delete the entity in PlayerDeathSystem
}
}
bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
{
if (!IsServer && m_NetworkEnabled) {
return false;
}
ComponentWrapper cHealth = e.Victim["Health"];
double& health = cHealth["Health"];
health -= e.Damage;
if (health <= 0.0) {
Events::PlayerDeath ePlayerDeath;
ePlayerDeath.Player = e.Victim;
m_EventBroker->Publish(ePlayerDeath);
//Note: we will delete the entity in PlayerDeathSystem
}
return true;
}
@@ -34,6 +39,7 @@ bool HealthSystem::OnInputCommand(Events::InputCommand& e)
{
if (e.Command == "TakeDamage" && e.Value > 0 && LocalPlayer.Valid()) {
Events::PlayerDamage ev;
ev.Inflictor = LocalPlayer;
ev.Victim = LocalPlayer;
ev.Damage = e.Value;
m_EventBroker->Publish(ev);
+80
View File
@@ -0,0 +1,80 @@
#include "Game/Systems/KillFeedSystem.h"
void KillFeedSystem::Update(double dt)
{
auto killFeeds = m_World->GetComponents("KillFeed");
if (killFeeds == nullptr) {
return;
}
for (auto& killFeedComponent : *killFeeds) {
EntityWrapper entity = EntityWrapper(m_World, killFeedComponent.EntityID);
for (int i = 1; i <= 3; i++) {
EntityWrapper child = entity.FirstChildByName("KillFeed" + std::to_string(i));
if (child.HasComponent("Text")) {
(std::string&)child["Text"]["Content"] = "";
}
}
int feedIndex = 1;
for (auto it = m_DeathQueue.begin(); it != m_DeathQueue.end(); ) {
bool remove = false;
EntityWrapper child = entity.FirstChildByName("KillFeed" + std::to_string(feedIndex));
if (child.HasComponent("Text")) {
(std::string&)child["Text"]["Content"] = (*it).Content;
(glm::vec4&)child["Text"]["Color"] = (*it).Color;
(*it).TimeToLive -= dt;
if ((*it).TimeToLive <= 0.f) {
(std::string&)child["Text"]["Content"] = "";
(glm::vec4&)child["Text"]["Color"] = (*it).Color;
remove = true;
}
}
feedIndex++;
if(feedIndex > 3) {
break;
}
if(remove) {
it = m_DeathQueue.erase(it);
} else {
it++;
}
}
}
}
bool KillFeedSystem::OnPlayerDeath(Events::PlayerDeath& e)
{
KillFeedInfo kfInfo;
if (e.Player.HasComponent("Team")) {
int red = e.Player["Team"].Enum("Team", "Red");
int blue = e.Player["Team"].Enum("Team", "Blue");
if ((int)e.Player["Team"]["Team"] == red) {
kfInfo.Content = "Blue Player killed Red Player";
kfInfo.Color = glm::vec4(0.f, 0.2f, 1.f, 0.8f);
m_DeathQueue.push_back(kfInfo);
} else if ((int)e.Player["Team"]["Team"] == blue) {
kfInfo.Content = "Red Player killed blue Player";
kfInfo.Color = glm::vec4(1.f, 0.f, 0.f, 0.8f);
m_DeathQueue.push_back(kfInfo);
}
}
if(m_DeathQueue.size() > 3) {
m_DeathQueue.pop_front();
}
return true;
}
+26 -25
View File
@@ -16,7 +16,9 @@ PlayerMovementSystem::~PlayerMovementSystem()
void PlayerMovementSystem::Update(double dt)
{
updateMovementControllers(dt);
updateVelocity(dt);
if (LocalPlayer.Valid()) {
updateVelocity(LocalPlayer, dt);
}
}
void PlayerMovementSystem::updateMovementControllers(double dt)
@@ -40,7 +42,8 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
EntityWrapper playerModel = player.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
ComponentWrapper cAnimationOffset = playerModel["AnimationOffset"];
double time = (cameraOrientation.x + glm::half_pi<float>()) / glm::pi<float>();
float pitch = cameraOrientation.x + 0.2;
double time = (pitch + glm::half_pi<float>()) / glm::pi<float>();
cAnimationOffset["Time"] = time;
}
}
@@ -78,18 +81,18 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
}
glm::vec3& velocity = cPhysics["Velocity"];
bool isOnGround = (bool)cPhysics["IsOnGround"];
ImGui::Text(isOnGround ? "On ground" : "In air");
ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
//ImGui::Text(isOnGround ? "On ground" : "In air");
//ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
glm::vec3 groundVelocity(0.f, 0.f, 0.f);
groundVelocity.x = velocity.x;
groundVelocity.z = velocity.z;
ImGui::Text("groundVelocity: (%f, %f, %f) |%f|", groundVelocity.x, groundVelocity.y, groundVelocity.z, glm::length(groundVelocity));
ImGui::Text("wishDirection: (%f, %f, %f) |%f|", wishDirection.x, wishDirection.y, wishDirection.z, glm::length(wishDirection));
//ImGui::Text("groundVelocity: (%f, %f, %f) |%f|", groundVelocity.x, groundVelocity.y, groundVelocity.z, glm::length(groundVelocity));
//ImGui::Text("wishDirection: (%f, %f, %f) |%f|", wishDirection.x, wishDirection.y, wishDirection.z, glm::length(wishDirection));
float currentSpeedProj = glm::dot(groundVelocity, wishDirection);
float addSpeed = wishSpeed - currentSpeedProj;
ImGui::Text("currentSpeedProj: %f", currentSpeedProj);
ImGui::Text("wishSpeed: %f", wishSpeed);
ImGui::Text("addSpeed: %f", addSpeed);
//ImGui::Text("currentSpeedProj: %f", currentSpeedProj);
//ImGui::Text("wishSpeed: %f", wishSpeed);
//ImGui::Text("addSpeed: %f", addSpeed);
if (addSpeed > 0) {
static float accel = 15.f;
@@ -113,15 +116,17 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
if (isOnGround) {
controller->SetDoubleJumping(false);
} else {
//put a hexagon at the players feet
auto hexagonEffect = ResourceManager::Load<EntityFile>("Schema/Entities/DoubleJumpHexagon.xml");
EntityFileParser parser(hexagonEffect);
EntityID hexagonEffectID = parser.MergeEntities(m_World);
EntityWrapper hexagonEW = EntityWrapper(m_World, hexagonEffectID);
hexagonEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
controller->SetDoubleJumping(true);
Events::DoubleJump e;
m_EventBroker->Publish(e);
if (IsClient) {
//put a hexagon at the players feet
auto hexagonEffect = ResourceManager::Load<EntityFile>("Schema/Entities/DoubleJumpHexagon.xml");
EntityFileParser parser(hexagonEffect);
EntityID hexagonEffectID = parser.MergeEntities(m_World);
EntityWrapper hexagonEW = EntityWrapper(m_World, hexagonEffectID);
hexagonEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
controller->SetDoubleJumping(true);
Events::DoubleJump e;
m_EventBroker->Publish(e);
}
}
velocity.y = 4.f;
}
@@ -218,15 +223,11 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
}
void PlayerMovementSystem::updateVelocity(double dt)
void PlayerMovementSystem::updateVelocity(EntityWrapper player, double dt)
{
// Only apply velocity to local player
if (!LocalPlayer.Valid()) {
return;
}
ComponentWrapper& cTransform = LocalPlayer["Transform"];
ComponentWrapper& cPhysics = LocalPlayer["Physics"];
ComponentWrapper& cTransform = player["Transform"];
ComponentWrapper& cPhysics = player["Physics"];
glm::vec3& velocity = cPhysics["Velocity"];
bool isOnGround = (bool)cPhysics["IsOnGround"];
+13 -6
View File
@@ -128,6 +128,12 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e)
// When a player is actually spawned (since the actual spawning is handled on the server)
// Hack should be moved.
// TODO: Set the player name to whatever
EntityWrapper playerName = e.Player.FirstChildByName("PlayerName");
if (playerName.Valid()) {
playerName["Text"]["Content"] = e.PlayerName;
}
if (!IsClient) {
return false;
}
@@ -153,12 +159,6 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e)
}
}
// TODO: Set the player name to whatever
EntityWrapper playerName = e.Player.FirstChildByName("PlayerName");
if (playerName.Valid()) {
playerName["Text"]["Content"] = e.PlayerName;
}
return true;
}
@@ -176,8 +176,15 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e)
if ((ComponentInfo::EnumType)cTeam["Team"] == cTeam["Team"].Enum("Spectator")) {
return false;
}
if (m_PlayerIDs.count(e.Player.ID) == 0) {
return false;
}
SpawnRequest req;
req.PlayerID = m_PlayerIDs.at(e.Player.ID);
req.Team = cTeam["Team"];
m_SpawnRequests.push_back(req);
return true;
}
+13 -7
View File
@@ -6,13 +6,15 @@ SoundSystem::SoundSystem(SystemParams params)
{
ConfigFile* config = ResourceManager::Load<ConfigFile>("Config.ini");
m_Announcer = ResourceManager::Load<ConfigFile>("Config.ini")->Get<std::string>("Sound.Announcer", "female");
EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &SoundSystem::OnPlayerSpawned);
EVENT_SUBSCRIBE_MEMBER(m_InputCommand, &SoundSystem::OnInputCommand);
EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &SoundSystem::OnDoubleJump);
EVENT_SUBSCRIBE_MEMBER(m_EDashAbility, &SoundSystem::OnDashAbility);
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDamage, &SoundSystem::OnPlayerDamage);
EVENT_SUBSCRIBE_MEMBER(m_ECaptured, &SoundSystem::OnCaptured);
EVENT_SUBSCRIBE_MEMBER(m_ETriggerTouch, &SoundSystem::OnTriggerTouch);
if (IsClient) {
EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &SoundSystem::OnPlayerSpawned);
EVENT_SUBSCRIBE_MEMBER(m_InputCommand, &SoundSystem::OnInputCommand);
EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &SoundSystem::OnDoubleJump);
EVENT_SUBSCRIBE_MEMBER(m_EDashAbility, &SoundSystem::OnDashAbility);
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDamage, &SoundSystem::OnPlayerDamage);
EVENT_SUBSCRIBE_MEMBER(m_ECaptured, &SoundSystem::OnCaptured);
EVENT_SUBSCRIBE_MEMBER(m_ETriggerTouch, &SoundSystem::OnTriggerTouch);
}
}
void SoundSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cComponent, double dt)
@@ -20,6 +22,10 @@ void SoundSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cComp
void SoundSystem::Update(double dt)
{
if (!IsClient) {
return;
}
// Temp for play test.
if (m_DrumsIsPlaying) {
m_DrumsIsPlaying = !drumTimer(dt);
@@ -4,6 +4,7 @@ AssaultWeaponBehaviour::AssaultWeaponBehaviour(SystemParams systemParams, IRende
: WeaponBehaviour(systemParams, renderer, collisionOctree, player)
{
m_FirstPersonModel = m_Player.FirstChildByName("Hands");
m_ThirdPersonModel = m_Player.FirstChildByName("PlayerModel");
EVENT_SUBSCRIBE_MEMBER(m_EAnimationComplete, &AssaultWeaponBehaviour::OnAnimationComplete);
}
@@ -37,12 +38,18 @@ void AssaultWeaponBehaviour::Reload()
// Don't reload if we're completly out of ammo
if (ammo == 0) {
playEmptySound();
m_TimeSinceLastFire = -0.0f; // HACK: To make empty sound play with interval
return;
}
m_Reloading = true;
m_ReloadTimer = cAssaultWeapon["ReloadTime"];
playReloadAnimation();
Events::PlaySoundOnEntity e;
e.EmitterID = cAssaultWeapon.EntityID;
e.FilePath = "Audio/weapon/reload.wav";
m_EventBroker->Publish(e);
}
void AssaultWeaponBehaviour::Update(double dt)
@@ -50,9 +57,14 @@ void AssaultWeaponBehaviour::Update(double dt)
if (m_Reloading) {
m_ReloadTimer -= dt;
// Re-enable glow on reload impersonator half-way through the animation
if (m_ReloadTimer <= (double)m_Player["AssaultWeapon"]["ReloadTime"] / 2.0) {
if (m_ReloadImpersonator.Valid()) {
m_ReloadImpersonator["Model"]["GlowMap"] = true;
if (IsClient) {
if (m_ReloadTimer <= (double)m_Player["AssaultWeapon"]["ReloadTime"] / 2.0) {
if (m_FirstPersonReloadImpersonator.Valid()) {
m_FirstPersonReloadImpersonator["Model"]["GlowMap"] = true;
}
if (m_ThirdPersonReloadImpersonator.Valid()) {
m_ThirdPersonReloadImpersonator["Model"]["GlowMap"] = true;
}
}
}
if (m_ReloadTimer <= 0) {
@@ -69,14 +81,18 @@ void AssaultWeaponBehaviour::Update(double dt)
}
if (!m_Firing && !m_Reloading) {
playIdleAnimation();
if (IsClient) {
playIdleAnimation();
}
}
// Disable glow map on weapon if it's out of ammo
// Make real first person weapon model visible again
EntityWrapper firstPersonWeaponModel = m_Player.FirstChildByName("WeaponModel");
if (firstPersonWeaponModel.Valid()) {
firstPersonWeaponModel["Model"]["GlowMap"] = hasAmmo();
if (IsClient) {
EntityWrapper firstPersonWeaponModel = m_Player.FirstChildByName("WeaponModel");
if (firstPersonWeaponModel.Valid()) {
firstPersonWeaponModel["Model"]["GlowMap"] = hasAmmo();
}
}
}
@@ -117,20 +133,23 @@ void AssaultWeaponBehaviour::fireRound()
if (magAmmo <= 0) {
Reload();
return;
}
}
// Fire
magAmmo -= 1;
spawnTracer();
playSound();
viewPunch();
playShootAnimation();
bool hit = shoot(cAssaultWeapon["BaseDamage"]);
if (hit) {
showHitMarker();
}
m_TimeSinceLastFire = 0.0;
// Effects
if (IsClient) {
spawnTracer();
playFireSound();
viewPunch();
playShootAnimation();
bool hit = shoot(cAssaultWeapon["BaseDamage"]);
if (hit) {
showHitMarker();
}
}
}
void AssaultWeaponBehaviour::spawnTracer()
@@ -140,7 +159,8 @@ void AssaultWeaponBehaviour::spawnTracer()
}
EntityWrapper spawner;
if (m_Player == LocalPlayer) {
bool outOfBodyExperience = ResourceManager::Load<ConfigFile>("Config.ini")->Get<bool>("Debug.OutOfBodyExperience", false);
if (m_Player == LocalPlayer && !outOfBodyExperience) {
spawner = m_Player.FirstChildByName("WeaponMuzzle");
} else {
spawner = m_Player.FirstChildByName("ThirdPersonWeaponMuzzle");
@@ -168,7 +188,7 @@ float AssaultWeaponBehaviour::traceRayDistance(glm::vec3 origin, glm::vec3 direc
}
}
void AssaultWeaponBehaviour::playSound()
void AssaultWeaponBehaviour::playFireSound()
{
if (!IsClient) {
return;
@@ -180,6 +200,19 @@ void AssaultWeaponBehaviour::playSound()
m_EventBroker->Publish(e);
}
void AssaultWeaponBehaviour::playEmptySound()
{
if (!IsClient) {
return;
}
Events::PlaySoundOnEntity e;
e.EmitterID = m_Player.ID;
e.FilePath = "Audio/weapon/zeroAmmo.wav";
m_EventBroker->Publish(e);
}
void AssaultWeaponBehaviour::viewPunch()
{
EntityWrapper playerCamera = m_Player.FirstChildByName("Camera");
@@ -206,7 +239,13 @@ void AssaultWeaponBehaviour::finishReload()
// Make real first person weapon model visible again
EntityWrapper firstPersonWeaponModel = m_Player.FirstChildByName("WeaponModel");
firstPersonWeaponModel["Model"]["Visible"] = true;
if (firstPersonWeaponModel.Valid()) {
firstPersonWeaponModel["Model"]["Visible"] = true;
}
EntityWrapper thirdPersonWeaponModel = m_Player.FirstChildByName("ThirdPersonWeaponModel");
if (thirdPersonWeaponModel.Valid()) {
thirdPersonWeaponModel["Model"]["Visible"] = true;
}
m_Reloading = false;
}
@@ -259,19 +298,45 @@ void AssaultWeaponBehaviour::playIdleAnimation()
void AssaultWeaponBehaviour::playReloadAnimation()
{
// Play animation
ComponentWrapper cAnimation = m_FirstPersonModel["Animation"];
cAnimation["AnimationName1"] = "ReloadSwitch";
cAnimation["Weight1"] = 1.0;
cAnimation["Time1"] = 0.0;
cAnimation["Speed1"] = 0.5;
cAnimation["Loop1"] = true;
// First person
if (IsClient)
{
ComponentWrapper cAnimation = m_FirstPersonModel["Animation"];
cAnimation["AnimationName1"] = "ReloadSwitch";
cAnimation["Weight1"] = 1.0;
cAnimation["Time1"] = 0.0;
cAnimation["Speed1"] = 0.5;
cAnimation["Loop1"] = true;
}
// TODO: Third person
//{
// ComponentWrapper cAnimation = m_ThirdPersonModel["Animation"];
// cAnimation["AnimationName1"] = "ReloadSwitch";
// cAnimation["Weight1"] = 1.0;
// cAnimation["Time1"] = 0.0;
// cAnimation["Speed1"] = 0.5;
// cAnimation["Loop1"] = true;
//}
// Hide weapon model and spawn the exploding version
EntityWrapper firstPersonWeaponModel = m_Player.FirstChildByName("WeaponModel");
EntityWrapper reloadSpawner = m_Player.FirstChildByName("FirstPersonReloadSpawner");
m_ReloadImpersonator = SpawnerSystem::Spawn(reloadSpawner, reloadSpawner);
firstPersonWeaponModel["Model"].Copy(m_ReloadImpersonator["Model"]);
firstPersonWeaponModel["Model"]["Visible"] = false;
{
EntityWrapper firstPersonWeaponModel = m_Player.FirstChildByName("WeaponModel");
EntityWrapper reloadSpawner = m_Player.FirstChildByName("FirstPersonReloadSpawner");
if (IsClient) {
m_FirstPersonReloadImpersonator = SpawnerSystem::Spawn(reloadSpawner, reloadSpawner);
firstPersonWeaponModel["Model"].Copy(m_FirstPersonReloadImpersonator["Model"]);
}
firstPersonWeaponModel["Model"]["Visible"] = false;
}
{
EntityWrapper thirdPersonWeaponModel = m_Player.FirstChildByName("ThirdPersonWeaponModel");
EntityWrapper reloadSpawner = m_Player.FirstChildByName("ThirdPersonReloadSpawner");
if (IsClient) {
m_ThirdPersonReloadImpersonator = SpawnerSystem::Spawn(reloadSpawner, reloadSpawner);
thirdPersonWeaponModel["Model"].Copy(m_ThirdPersonReloadImpersonator["Model"]);
}
thirdPersonWeaponModel["Model"]["Visible"] = false;
}
}
bool AssaultWeaponBehaviour::shoot(double damage)
@@ -302,6 +367,9 @@ bool AssaultWeaponBehaviour::shoot(double damage)
}
EntityWrapper victim(m_World, pickData.Entity);
if (!victim.Valid()) {
return false;
}
// Don't let us shoot ourselves in the foot
if (victim == LocalPlayer) {
@@ -337,5 +405,9 @@ void AssaultWeaponBehaviour::showHitMarker()
EntityWrapper hitMarkerSpawner = m_Player.FirstChildByName("HitMarkerSpawner");
if (hitMarkerSpawner.Valid()) {
SpawnerSystem::Spawn(hitMarkerSpawner, hitMarkerSpawner);
Events::PlaySoundOnEntity e;
e.EmitterID = m_Player.ID;
e.FilePath = "Audio/weapon/hitclick.wav";
m_EventBroker->Publish(e);
}
}
+18 -4
View File
@@ -1,11 +1,25 @@
#include "Game.h"
#include "MiniDump.h"
LONG WINAPI CrashHandler(EXCEPTION_POINTERS* pException);
int main(int argc, char* argv[])
{
Game game(argc, argv);
while (game.Running()) {
game.Tick();
}
::SetUnhandledExceptionFilter(CrashHandler);
Game game(argc, argv);
while (game.Running()) {
game.Tick();
}
return 0;
}
LONG WINAPI CrashHandler(EXCEPTION_POINTERS* pException)
{
//Take minidump. path should be bin/TacticalZ.dmp
//Then show MessageBox, and exit application.
Create_Dump(pException, 1, 1);
return EXCEPTION_EXECUTE_HANDLER;// EXCEPTION_CONTINUE_SEARCH
}