Compare commits

...

24 Commits

Author SHA1 Message Date
stiffly 8cef422ea7 Merge remote-tracking branch 'origin/master' into PerfectSoundForRelease
# Conflicts:
#	resources/Schema/Entities/CP_Rocky2.xml
2016-03-14 01:51:51 +01:00
stiffly 54a03ddc0f Hurt sound only played for local player. 2016-03-14 01:49:37 +01:00
Jace d492b54687 Added executable icon to CMakeLists 2016-03-14 01:42:14 +01:00
stiffly c1395355c6 Removed comment 2016-03-14 01:36:11 +01:00
Jace f62f8d53db Merge branch 'Setup' 2016-03-14 01:30:49 +01:00
Jace 51c7e92fce Fixed redist install 2016-03-14 01:29:11 +01:00
Teejoon c61d33ebd9 NewScorebord 2016-03-14 01:08:22 +01:00
stiffly 3994c0f7ad Merge remote-tracking branch 'origin/master' into PerfectSoundForRelease 2016-03-14 00:59:32 +01:00
stiffly 1345889e62 The win sound plays on win screen 2016-03-14 00:58:53 +01:00
Adam Byléhn 50abeda99a Merge pull request #218 from teamfisk/DashEffect
Dash effect
2016-03-14 00:58:00 +01:00
Jace fe6f294986 Moved installer script to subdir 2016-03-14 00:52:03 +01:00
Jace 33ed59fc3a Added files for setup creation 2016-03-14 00:45:09 +01:00
Tleety fd482dd670 Axyz logo in menu 2016-03-14 00:37:29 +01:00
Tleety c493ebca8e Viewpunch for sidearm and defender 2016-03-14 00:23:51 +01:00
William Moberg ef9a449077 Merge branch 'master' into DashEffect 2016-03-14 00:07:45 +01:00
William Moberg 12d0c68fbf Weapon should fade on dash effect afterimage. 2016-03-13 23:57:47 +01:00
stiffly 7855cf03d2 The Endscreen now works over the network. 2016-03-13 23:33:10 +01:00
William Moberg e2686abb16 Merge branch 'master' into DashEffect 2016-03-13 23:25:38 +01:00
William Moberg be91fc5005 WIP dash effect fade weapon 2. 2016-03-13 23:23:36 +01:00
William Moberg 0084224e18 WIP, dash effect fade weapon. 2016-03-13 23:23:05 +01:00
William Moberg e4145cf292 Fixed dash effect to be supported with the new animations using Fade components.
Added bool Loop field in Fade component.
2016-03-13 22:49:24 +01:00
stiffly 03dab9ca9a Merge remote-tracking branch 'origin/master' into PerfectSoundForRelease 2016-03-13 22:33:23 +01:00
stiffly 1a120ef345 Merge remote-tracking branch 'origin/master' into PerfectSoundForRelease 2016-03-13 22:22:41 +01:00
stiffly 0d823421d8 Added win sound file 2016-03-13 22:22:19 +01:00
30 changed files with 10553 additions and 9879 deletions
+1 -1
Submodule assets updated: 2c75d24ddf...b6027bf49f
+1 -1
Submodule deps updated: ed45883a44...49ef585366
+2
View File
@@ -36,6 +36,7 @@
#include "Network/ESearchForServers.h"
#include "Network/EInterpolate.h"
#include "Network/SnapshotFilter.h"
#include "Core/EWin.h"
class Client : public Network
{
@@ -107,6 +108,7 @@ private:
void parseAmmoPickup(Packet& packet);
void parseRemoveWorld(Packet& packet);
void parseKDEvent(Packet& packet);
void parseWin(Packet& packet);
void InterpolateFields(Packet& packet, const ComponentInfo & componentInfo, const EntityID & entityID, const std::string & componentType);
void parseSnapshot(Packet& packet);
void identifyPacketLoss();
+1
View File
@@ -25,6 +25,7 @@ enum class MessageType
AmmoPickup,
RemoveWorld,
KD,
Win,
Invalid
};
+1
View File
@@ -81,6 +81,7 @@ private:
void setSoundProperties(Source* source, ComponentWrapper* soundComponent);
float getDurationSeconds(Source* source);
float getTimeOffsetSeconds(Source* source);
void setTimeOffsetSeconds(Source* source, float timeOffset);
// Specific logic
void playSound(Source* source);
@@ -32,6 +32,8 @@ private:
glm::vec3 m_LastPosition = glm::vec3();
// Used to track afterimages for sprint effect.
float m_SprintEffectTimer;
// Used to track afterimages for dash effect.
float m_DashEffectTimer;
// The logic for making the sound play when player is moving
void playerStep(double dt, EntityWrapper player);
// Spawn a hexagon at origin of an Entity
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<BoostAssault xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BoostAssault.xsd">
<StrengthOfEffect>2</StrengthOfEffect>
<StrengthOfEffect>1.35</StrengthOfEffect>
</BoostAssault>
@@ -10,8 +10,8 @@
<MaxTravelAngle>0.174533</MaxTravelAngle> <!-- 0.174533 = 10 degrees -->
<NumPellets>9</NumPellets>
<RPM>120</RPM>
<ViewPunch>0.03</ViewPunch>
<ViewReturnSpeed>0.2</ViewReturnSpeed>
<ViewPunch>0.15</ViewPunch>
<ViewReturnSpeed>0.3</ViewReturnSpeed>
<ReloadTime>0.5</ReloadTime>
<TriggerHeld>false</TriggerHeld>
<FireCooldown>0</FireCooldown>
+1
View File
@@ -3,5 +3,6 @@
<FadeTime>1</FadeTime>
<Time>0</Time>
<Out>true</Out>
<Loop>true</Loop>
<Reverse>false</Reverse>
</Fade>
+3
View File
@@ -11,6 +11,9 @@
<xs:element name="Out" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>If the entity should fade out or in.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Loop" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>If the effect should loop when it is done.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Reverse" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>If the entity should reverse the fade after finishing, this will double the speed.</xs:documentation></xs:annotation>
</xs:element>
@@ -6,7 +6,9 @@
<BaseDamage>20</BaseDamage>
<RPM>500</RPM>
<Automatic>false</Automatic>
<ViewPunch>0.01</ViewPunch>
<ViewPunch>0.05</ViewPunch>
<MaxTravelAngle>0.174533</MaxTravelAngle> <!-- 0.174533 = 10 degrees -->
<ViewReturnSpeed>0.2</ViewReturnSpeed>
<ReloadTime>1.0</ReloadTime>
<EquipTime>0.5</EquipTime>
<TriggerHeld>false</TriggerHeld>
@@ -14,4 +16,5 @@
<ReloadQueued>false</ReloadQueued>
<IsReloading>false</IsReloading>
<ReloadTimer>0</ReloadTimer>
<CurrentTravel>0</CurrentTravel>
</SidearmWeapon>
@@ -36,6 +36,12 @@
<xs:element name="ViewPunch" type="t:float" minOccurs="0">
<xs:annotation><xs:documentation>View punch in radians for each shell fired</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="MaxTravelAngle" type="t:float" minOccurs="0">
<xs:annotation><xs:documentation>Maximum vertical aim travel angle in radians</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="ViewReturnSpeed" type="t:float" minOccurs="0">
<xs:annotation><xs:documentation>The speed in radians per second the view returns to its original position after being punched</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="ReloadTime" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>Time it takes to load ONE SHELL into the weapon in seconds</xs:documentation></xs:annotation>
</xs:element>
@@ -47,6 +53,7 @@
<xs:element name="ReloadQueued" type="t:bool" minOccurs="0"/>
<xs:element name="IsReloading" type="t:bool" minOccurs="0"/>
<xs:element name="ReloadTimer" type="t:double" minOccurs="0"/>
<xs:element name="CurrentTravel" type="t:float" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
File diff suppressed because it is too large Load Diff
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="DashEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.5</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children/>
</Entity>
+332 -2
View File
@@ -18,7 +18,126 @@
<Position X="-16.5" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
<Children>
<Entity name="ScoreBoard_Red_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="RedSide">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="1" B="0" G="0.0862745121" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0" Z="0.5"/>
<Scale X="32" Y="23" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ScoreBoard_Red">
<Components>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:ScoreScreen>
<Offset X="0" Y="-3" Z="0"/>
</c:ScoreScreen>
<c:Transform>
<Position X="0" Y="7" Z="1.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="IDText">
<Components>
<c:Text>
<Content>ID</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="-13" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="NameText">
<Components>
<c:Text>
<Content>Name</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="-10" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="KDText">
<Components>
<c:Text>
<Content>KD</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="1.28838646" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="KillsText">
<Components>
<c:Text>
<Content>Kills</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="4.6874299" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="DeathsText">
<Components>
<c:Text>
<Content>Deaths</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="8.9577198" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="Background_Main">
<Components>
@@ -56,7 +175,126 @@
<Position X="16.5" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
<Children>
<Entity name="ScoreBoard_Blue_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="BlueSide">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="1" B="1" G="0.505882382" R="0"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0" Z="0.5"/>
<Scale X="32" Y="23" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ScoreBoard_Blue">
<Components>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:ScoreScreen>
<Offset X="0" Y="-3" Z="0"/>
</c:ScoreScreen>
<c:Transform>
<Position X="0" Y="7" Z="1.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="IDText">
<Components>
<c:Text>
<Content>ID</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="-13" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="NameText">
<Components>
<c:Text>
<Content>Name</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="-10" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="KDText">
<Components>
<c:Text>
<Content>KD</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="1.28838646" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="KillsText">
<Components>
<c:Text>
<Content>Kills</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="4.6874299" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="DeathsText">
<Components>
<c:Text>
<Content>Deaths</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="8.9577198" Y="2.5" Z="0"/>
<Scale X="2" Y="2" Z="2"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ScoreBoard_Spectators">
<Components>
@@ -70,6 +308,98 @@
</Components>
<Children/>
</Entity>
<Entity name="EndScreen">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="EndScreen_Origin">
<Components>
<c:Transform>
<Position X="0" Y="3.10000014" Z="42.9360008"/>
</c:Transform>
</Components>
<Children>
<Entity name="Camera">
<Components>
<c:Camera/>
<c:EndScreen/>
<c:Transform/>
</Components>
<Children>
<Entity name="Sprite_Origin">
<Components>
<c:Transform>
<Position X="0" Y="0.65200001" Z="-1.72800004"/>
</c:Transform>
</Components>
<Children>
<Entity name="SpriteRed">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground>
<Color A="0.588235319" B="0" G="0" R="0.588235319"/>
<Visible>false</Visible>
</c:Sprite>
<c:Transform>
<Scale X="1.30000007" Y="0.300000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SpriteBlue">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground>
<Color A="0.588235319" B="0.588235319" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Scale X="1.30000007" Y="0.300000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="TextBlue">
<Components>
<c:Text>
<Content>Blue team win!</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Visible>false</Visible>
</c:Text>
<c:Transform>
<Position X="0" Y="-0.0670000017" Z="0.0299999993"/>
<Scale X="0.150000006" Y="0.150000006" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="TextRed">
<Components>
<c:Text>
<Content>Red team win!</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
</c:Text>
<c:Transform>
<Position X="0" Y="-0.0670000017" Z="0.0299999993"/>
<Scale X="0.150000006" Y="0.150000006" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
+75 -39
View File
@@ -34,7 +34,7 @@
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Orientation X="0" Y="98.9142075" Z="0"/>
<Orientation X="0" Y="214.830872" Z="0"/>
</c:Transform>
</Components>
<Children>
@@ -46,7 +46,7 @@
</c:RaptorCopter>
<c:Transform>
<Position X="0" Y="26" Z="40"/>
<Orientation X="0" Y="-114.726761" Z="0"/>
<Orientation X="0" Y="-346.565979" Z="0"/>
</c:Transform>
</Components>
<Children>
@@ -92,42 +92,6 @@
<c:Transform/>
</Components>
<Children>
<Entity name="ButtonCorner_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="TopRight">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BottomRight">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
<Orientation X="0" Y="0" Z="4.71199989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Button_1">
<Components>
<c:Button/>
@@ -149,6 +113,44 @@
</Components>
<Children/>
</Entity>
<Entity name="ButtonCorner_Origin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="BottomRight">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
<Orientation X="0" Y="0" Z="4.71199989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="TopRight">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
<Scale X="0.00499999989" Y="0.00499999989" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Text">
<Components>
<c:Text>
@@ -218,6 +220,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
@@ -233,6 +236,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
@@ -263,6 +267,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
@@ -277,6 +282,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
@@ -299,6 +305,10 @@
<BlurBackground>true</BlurBackground>
<Color A="0.392156869" B="0" G="0" R="0"/>
</c:Sprite>
<c:InputCmdButton>
<Command>Options</Command>
<PressValue>1</PressValue>
</c:InputCmdButton>
<c:Transform>
<Scale X="0.200000003" Y="0.0500000007" Z="1"/>
</c:Transform>
@@ -308,7 +318,7 @@
<Entity name="Text">
<Components>
<c:Text>
<Content>Option</Content>
<Content>Options</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Alignment>
<Right/>
@@ -374,6 +384,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="-0.0219999999" Z="0.00499999989"/>
@@ -389,6 +400,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HUD/ButtonCorner_16.png</DiffuseTexture>
<Linear>false</Linear>
</c:Sprite>
<c:Transform>
<Position X="0.0970000029" Y="0.0220000017" Z="0.00499999989"/>
@@ -419,12 +431,36 @@
</Components>
<Children/>
</Entity>
<Entity name="OptionsSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/OptionMenu.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="TitleSprite">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Test/SmallDiff.png</DiffuseTexture>
<ClampToBorder>true</ClampToBorder>
</c:Sprite>
<c:Transform>
<Position X="0.0320000015" Y="0.0220000017" Z="-0.0550000034"/>
<Scale X="0.0500000007" Y="0.0150000006" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
+76
View File
@@ -0,0 +1,76 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Axyz"
#define MyAppVersion "1.0"
#define MyAppURL "https://github.com/teamfisk/TacticalZ"
#define MyAppExeName "TacticalZ.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{38D77EB2-6B56-4B4F-BAAE-43F9E6E1A191}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=Axyz Setup
SetupIconFile=..\Axyz.ico
Compression=lzma2
SolidCompression=yes
; "ArchitecturesAllowed=x64" specifies that Setup cannot run on
; anything but x64.
ArchitecturesAllowed=x64
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64
OutputDir=.
DisableWelcomePage=false
;WizardSmallImageFile=
WizardImageFile=Setup Banner.bmp
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "..\..\bin\Audio\*"; DestDir: "{app}\Audio\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Fonts\*"; DestDir: "{app}\Fonts\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Licenses\*"; DestDir: "{app}\Licenses\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Models\*"; DestDir: "{app}\Models\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Schema\*"; DestDir: "{app}\Schema\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Shaders\*"; DestDir: "{app}\Shaders\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Textures\*"; DestDir: "{app}\Textures\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\assimp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\DefaultConfig.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\TacticalZ.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\xerces-c_3_1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\zlib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\deps\redist\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[INI]
Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist
[Run]
Filename: "{tmp}\VC_redist.x64.exe"; Parameters: "/norestart /passive"; StatusMsg: "Installing Microsoft Visual C++ 2015 x64 Redistributable....";
[ThirdParty]
UseRelativePaths=True
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
View File
Binary file not shown.
+10
View File
@@ -176,6 +176,9 @@ void Client::parseMessageType(Packet& packet)
case MessageType::KD:
parseKDEvent(packet);
break;
case MessageType::Win:
parseWin(packet);
break;
default:
break;
}
@@ -376,6 +379,13 @@ void Client::parseKDEvent(Packet & packet)
m_EventBroker->Publish(e);
}
void Client::parseWin(Packet& packet)
{
Events::Win e;
e.TeamThatWon = packet.ReadPrimitive<int>();
m_EventBroker->Publish(e);
}
void Client::updateFields(Packet& packet, const ComponentInfo& componentInfo, const EntityID& entityID)
{
for (auto field : componentInfo.FieldsInOrder) {
+3
View File
@@ -609,6 +609,9 @@ bool Server::OnWin(const Events::Win & e)
{
// Postpone the gameover reset
m_GameIsOver = true;
Packet winPacket = Packet(MessageType::Win);
winPacket.WritePrimitive(e.TeamThatWon);
reliableBroadcast(winPacket);
return true;
}
+13
View File
@@ -417,6 +417,14 @@ bool SoundManager::OnSetCamera(const Events::SetCamera& e)
alSourcei(m_CurrentBGMCombo->ALsource, AL_LOOPING, 1);
setGain(m_CurrentBGMCombo, 0);
playSound(m_CurrentBGMCombo);
} else if (m_World->HasComponent(e.CameraEntity.ID, "EndScreen")) {
float timeOffset = getTimeOffsetSeconds(m_CurrentBGM);
stopSound(m_CurrentBGM);
m_CurrentBGM = createSource("Audio/BGM/Layer3.wav");
m_CurrentBGM->Type = SoundType::BGM;
alSourcei(m_CurrentBGM->ALsource, AL_LOOPING, 1);
playSound(m_CurrentBGM);
setTimeOffsetSeconds(m_CurrentBGM, timeOffset);
}
}
@@ -477,6 +485,11 @@ float SoundManager::getTimeOffsetSeconds(Source* source)
return time;
}
void SoundManager::setTimeOffsetSeconds(Source * source, float timeOffset)
{
alSourcef(source->ALsource, AL_SEC_OFFSET, timeOffset);
}
void SoundManager::initOpenAL()
{
// Initialize OpenAL
+1
View File
@@ -55,6 +55,7 @@ target_link_libraries(Game
add_executable(TacticalZ
main.cpp
${CMAKE_SOURCE_DIR}/resources/TacticalZ.rc
)
target_link_libraries(TacticalZ
Game
+2 -2
View File
@@ -24,14 +24,14 @@ void FadeSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cFade,
currentTime += dTime;
if(currentTime > fadeTime) {
currentTime = 0.0;
currentTime = 0.0 + fadeTime * (bool)cFade["Loop"];
if ((bool)cFade["Reverse"]) {
(Field<bool>)cFade["Out"] = !(bool)cFade["Out"];
currentTime = fadeTime;
}
}
if(currentTime < 0.0) {
currentTime = fadeTime;
currentTime = fadeTime * (bool)cFade["Loop"];
if ((bool)cFade["Reverse"]) {
(Field<bool>)cFade["Out"] = !(bool)cFade["Out"];
currentTime = 0.0;
+68 -25
View File
@@ -3,6 +3,7 @@
PlayerMovementSystem::PlayerMovementSystem(SystemParams params)
: System(params)
, m_SprintEffectTimer(0.f)
, m_DashEffectTimer(0.f)
{
EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &PlayerMovementSystem::OnPlayerSpawned);
EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &PlayerMovementSystem::OnDoubleJump);
@@ -24,23 +25,57 @@ void PlayerMovementSystem::Update(double dt)
if (LocalPlayer.Valid()){
updateVelocity(LocalPlayer, dt);
}
m_SprintEffectTimer += dt;
if (m_SprintEffectTimer < 0.016f) {
//m_SprintEffectTimer += dt;
//if (m_SprintEffectTimer < 0.016f) {
// return;
//}
//m_SprintEffectTimer = 0.f;
//auto pool = m_World->GetComponents("SprintAbility");
//if (pool == nullptr) {
// return;
//}
//for (auto cSprint : *pool) {
// if (cSprint.EntityID != LocalPlayer.ID && (bool)cSprint["Active"]) {
// // Spawn one afterimage for each player that sprints.
// EntityWrapper player(m_World, cSprint.EntityID);
// auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/SprintEffect.xml");
// EntityWrapper sprintEffect = entityFile->MergeInto(m_World);
// auto playerModel = player.FirstChildByName("PlayerModel");
// if (!playerModel.Valid()) {
// continue;
// }
// if (!playerModel.HasComponent("Model")) {
// continue;
// }
// if (!playerModel.HasComponent("Animation")) {
// continue;
// }
// auto playerEntityModel = playerModel["Model"];
// auto playerEntityAnimation = playerModel["Animation"];
// playerEntityModel.Copy(sprintEffect["Model"]);
// playerEntityAnimation.Copy(sprintEffect["Animation"]);
// sprintEffect["ExplosionEffect"]["EndColor"] = (glm::vec4)playerEntityModel["Color"];
// ((Field<glm::vec4>)sprintEffect["ExplosionEffect"]["EndColor"]).w(0.f);
// sprintEffect["Animation"]["Speed1"] = 0.0;
// sprintEffect["Animation"]["Speed2"] = 0.0;
// sprintEffect["Animation"]["Speed3"] = 0.0;
// sprintEffect["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
// sprintEffect["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"];
// }
//}
m_DashEffectTimer += dt;
if (m_DashEffectTimer < 0.075f) {
return;
}
m_SprintEffectTimer = 0.f;
auto pool = m_World->GetComponents("SprintAbility");
m_DashEffectTimer = 0.f;
auto pool = m_World->GetComponents("DashAbility");
if (pool == nullptr) {
return;
}
for (auto cSprint : *pool) {
if (cSprint.EntityID != LocalPlayer.ID && (bool)cSprint["Active"]) {
// Spawn one afterimage for each player that sprints.
EntityWrapper player(m_World, cSprint.EntityID);
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/SprintEffect.xml");
EntityWrapper sprintEffect = entityFile->MergeInto(m_World);
for (auto cDash : *pool) {
if (cDash.EntityID != LocalPlayer.ID && (double)cDash["CoolDownMaxTimer"] - (double)cDash["CoolDownTimer"] < 0.5) {
// Spawn one afterimage for each player that Dashes.
EntityWrapper player(m_World, cDash.EntityID);
auto playerModel = player.FirstChildByName("PlayerModel");
if (!playerModel.Valid()) {
continue;
@@ -48,20 +83,28 @@ void PlayerMovementSystem::Update(double dt)
if (!playerModel.HasComponent("Model")) {
continue;
}
if (!playerModel.HasComponent("Animation")) {
continue;
EntityWrapper dashEffect = playerModel.Clone();
for (auto& cAnim : dashEffect.ChildrenWithComponent("Animation")) {
cAnim["Animation"]["Play"] = false;
}
auto playerEntityModel = playerModel["Model"];
auto playerEntityAnimation = playerModel["Animation"];
playerEntityModel.Copy(sprintEffect["Model"]);
playerEntityAnimation.Copy(sprintEffect["Animation"]);
sprintEffect["ExplosionEffect"]["EndColor"] = (glm::vec4)playerEntityModel["Color"];
((Field<glm::vec4>)sprintEffect["ExplosionEffect"]["EndColor"]).w(0.f);
sprintEffect["Animation"]["Speed1"] = 0.0;
sprintEffect["Animation"]["Speed2"] = 0.0;
sprintEffect["Animation"]["Speed3"] = 0.0;
sprintEffect["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
sprintEffect["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"];
const double fadeTime = 0.5f;
for (auto& cModel : dashEffect.ChildrenWithComponent("Model")) {
EntityWrapper e(m_World, cModel.ID);
e.AttachComponent("Lifetime");
e.AttachComponent("Fade");
e["Fade"]["Loop"] = false;
e["Fade"]["FadeTime"] = fadeTime;
e["Fade"]["Time"] = fadeTime;
e["Lifetime"]["Lifetime"] = fadeTime;
}
dashEffect.AttachComponent("Lifetime");
dashEffect.AttachComponent("Fade");
dashEffect["Fade"]["Loop"] = false;
dashEffect["Fade"]["FadeTime"] = fadeTime;
dashEffect["Fade"]["Time"] = fadeTime;
dashEffect["Lifetime"]["Lifetime"] = fadeTime;
dashEffect["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
dashEffect["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"];
}
}
}
+3
View File
@@ -87,6 +87,9 @@ bool SoundSystem::OnPlayerDamage(const Events::PlayerDamage & e)
if (!e.Victim.Valid() || !e.Inflictor.Valid()) {
return false;
}
if (e.Victim.ID != LocalPlayer.ID) {
return false;
}
auto victimTeam = m_World->GetComponent(e.Victim.ID, "Team");
auto inflictorTeam = m_World->GetComponent(e.Inflictor.ID, "Team");
if ((int)victimTeam["Team"] == (int)inflictorTeam["Team"]) {
@@ -324,23 +324,23 @@ void DefenderWeaponBehaviour::fireShell(ComponentWrapper cWeapon, WeaponInfo& wi
spawnTracers(cWeapon, wi, pattern);
// View punch
//if (IsClient) {
// EntityWrapper camera = wi.Player.FirstChildByName("Camera");
// if (camera.Valid()) {
// glm::vec3& cameraOrientation = camera["Transform"]["Orientation"];
// float viewPunch = cWeapon["ViewPunch"];
// float maxTravelAngle = cWeapon["MaxTravelAngle"];
// float& currentTravel = cWeapon["CurrentTravel"];
// if (currentTravel < maxTravelAngle) {
// float change = viewPunch;
// if (currentTravel + change > maxTravelAngle) {
// change = maxTravelAngle - currentTravel;
// }
// cameraOrientation.x += change;
// currentTravel += change;
// }
// }
//}
if (IsClient) {
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
if (camera.Valid()) {
Field<glm::vec3> cameraOrientation = camera["Transform"]["Orientation"];
float viewPunch = cWeapon["ViewPunch"];
float maxTravelAngle = (const float&)cWeapon["MaxTravelAngle"];
Field<float> currentTravel = cWeapon["CurrentTravel"];
if (currentTravel < maxTravelAngle) {
float change = viewPunch;
if (currentTravel + change > maxTravelAngle) {
change = maxTravelAngle - currentTravel;
}
cameraOrientation.x(cameraOrientation.x() + change);
currentTravel += change;
}
}
}
// Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "FinalBlend", "Fire");
@@ -69,6 +69,21 @@ void SidearmWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
}
}
// Restore view angle
if (IsClient) {
Field<float> currentTravel = cWeapon["CurrentTravel"];
Field<float> returnSpeed = cWeapon["ViewReturnSpeed"];
if (currentTravel > 0) {
float change = returnSpeed * dt;
currentTravel = glm::max(0.f, currentTravel - change);
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
if (camera.Valid()) {
Field<glm::vec3> cameraOrientation = camera["Transform"]["Orientation"];
cameraOrientation.x(cameraOrientation.x() - change);
}
}
}
if ((bool)cWeapon["Automatic"] && canFire(cWeapon)) {
fireBullet(cWeapon, wi);
}
@@ -183,6 +198,25 @@ void SidearmWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
magAmmo -= 1;
}
// View punch
if (IsClient) {
EntityWrapper camera = wi.Player.FirstChildByName("Camera");
if (camera.Valid()) {
Field<glm::vec3> cameraOrientation = camera["Transform"]["Orientation"];
float viewPunch = cWeapon["ViewPunch"];
float maxTravelAngle = cWeapon["MaxTravelAngle"];
Field<float> currentTravel = cWeapon["CurrentTravel"];
if (currentTravel < maxTravelAngle) {
float change = viewPunch;
if (currentTravel + change > maxTravelAngle) {
change = maxTravelAngle - currentTravel;
}
cameraOrientation.x(cameraOrientation.x() + change);
currentTravel += change;
}
}
}
// Get weapon model based on current person
EntityWrapper weaponModelEntity = getRelevantWeaponEntity(wi);
if (!weaponModelEntity.Valid()) {