Compare commits

...

15 Commits

Author SHA1 Message Date
Jace 494746ad8b Merge remote-tracking branch 'origin/Recording' into Recording 2016-03-14 16:33:53 +01:00
Jace b886d9146b WIP STUFF 2016-03-14 08:33:33 +01:00
Jace 57715d5846 Merge branch 'master' into Recording 2016-03-14 06:13:23 +01:00
William Moberg fb3842ba5b Indentation. 2016-03-14 06:05:11 +01:00
William Moberg 6daaccb9ed Merge branch 'Recording' of github.com:teamfisk/TacticalZ into Recording
# Conflicts:
#	src/Engine/Editor/EditorSystem.cpp
2016-03-14 06:02:47 +01:00
William Moberg 0cd161184e Smoother movement for editor camera. 2016-03-14 06:00:12 +01:00
Jace 87b983ec6f Stuff 2016-03-14 05:56:09 +01:00
Joachim Pettersson 16ef09b20b Merge pull request #222 from teamfisk/DeathAnimation
Death effect re-added
2016-03-14 05:48:07 +01:00
Jace 592f33653e Better shadows for recording 2016-03-14 04:44:53 +01:00
viktorljung b9b5f4bff7 Removed healing effect of defender boost 2016-03-14 04:37:43 +01:00
viktorljung 5db1bddd08 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-14 04:31:45 +01:00
viktorljung b366a8c149 Red players fixes 2016-03-14 04:31:38 +01:00
Jace c74a4e375e Better CP_Valhalla lighting 2016-03-14 04:24:40 +01:00
Jace 78a383b03c Merge branch 'master' into Recording 2016-03-14 04:04:20 +01:00
Jace 24de85b476 Editor no longer resets camera 2016-03-14 04:02:05 +01:00
17 changed files with 24819 additions and 64 deletions
+1
View File
@@ -43,6 +43,7 @@ private:
EditorGUI::WidgetSpace m_WidgetSpace = EditorGUI::WidgetSpace::Global;
EntityWrapper m_Widget = EntityWrapper::Invalid;
EntityWrapper m_CurrentSelection = EntityWrapper::Invalid;
glm::vec3 m_CamVelocity;
// Utility functions
EntityWrapper importEntity(EntityWrapper parent, boost::filesystem::path filePath);
+1 -1
View File
@@ -69,7 +69,7 @@ private:
std::array<glm::mat4, MAX_SPLITS> m_LightProjection;
std::array<glm::mat4, MAX_SPLITS> m_LightView;
GLfloat m_NearFarPlane[2] = { -34.f, 27.f };
GLfloat m_NearFarPlane[2] = { -128.f, 128.f };
GLuint m_ResolutionSizeWidth = 1024 * 2;
GLuint m_ResolutionSizeHeight = 1024 * 2;
+1 -1
View File
@@ -2,5 +2,5 @@
<Camera xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Camera.xsd">
<FOV>59</FOV> <!-- 90 horizontal FOV at 1080p -->
<NearClip>0.01</NearClip>
<FarClip>5000</FarClip>
<FarClip>300</FarClip>
</Camera>
+138
View File
@@ -0,0 +1,138 @@
<?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:SceneLight>
<AmbientColor A="1" B="0.392156869" G="0.392156869" R="0.392156869"/>
<Gamma>1</Gamma>
<Exposure>0.82000017166137695</Exposure>
</c:SceneLight>
<c:CapturePointGameMode>
<RespawnTime>0.32289272439493288</RespawnTime>
<MaxRespawnTime>0.5</MaxRespawnTime>
</c:CapturePointGameMode>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<GlowIntensity>1.0199999809265137</GlowIntensity>
<Resource>Models/Props/Walls/SciFiWallTop.mesh</Resource>
<Color A="1" B="3.92156863" G="1" R="1"/>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0" Y="58.718792" Z="15.6310005"/>
<Orientation X="0" Y="0" Z="3.14199996"/>
<Scale X="0.279000014" Y="1" Z="0.279000014"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Props/Pillars/SciFiPillar2Blue.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="-14.4384613" Y="-1.2316848" Z="0"/>
<Orientation X="0" Y="2.64800024" Z="0"/>
<Scale X="2" Y="3.60000014" Z="1.9000001"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Props/Pillars/SciFiPillar2Blue.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="14.3019333" Y="-1.12725353" Z="0"/>
<Orientation X="0" Y="3.84800029" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Dir">
<Components>
<c:DirectionalLight>
<Color A="1" B="0.725490212" G="0.75686276" R="0.741176486"/>
<Intensity>1.0699999332427979</Intensity>
</c:DirectionalLight>
<c:Transform>
<Orientation X="3.68318534" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Cam">
<Components>
<c:Camera>
<FOV>47</FOV>
</c:Camera>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Shadow>false</Shadow>
<NormalMap>false</NormalMap>
<DiffuseTexture>false</DiffuseTexture>
<SpecularMap>false</SpecularMap>
<GlowMap>false</GlowMap>
</c:Model>
<c:Transform>
<Position X="0.100000001" Y="-0.0670000017" Z="-32.8670006"/>
<Orientation X="0" Y="3.1400001" Z="0"/>
<Scale X="0.100000001" Y="0.100000001" Z="0.100000001"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Spawn">
<Components>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:PlayerSpawn>
<AssaultFile>Schema/Entities/PlayerAssaultBlue.xml</AssaultFile>
<DefenderFile>Schema/Entities/PlayerDefenderBlue.xml</DefenderFile>
<SniperFile></SniperFile>
</c:PlayerSpawn>
<c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Spawner>
<EntityFile></EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.100000001" Y="2.8398931" Z="-29.0827847"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Model>
<Resource>Models/Highgrounds/Hg21.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="-1.75605178" Z="-20.9220009"/>
<Scale X="0.407000005" Y="0.407000005" Z="0.407000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -20,8 +20,8 @@
</Team>
</c:Team>
<c:PlayerSpawn>
<AssaultFile>Schema/Entities/PlayerAssaultBlue.xml</AssaultFile>
<DefenderFile>Schema/Entities/PlayerDefenderBlue.xml</DefenderFile>
<AssaultFile>Schema/Entities/PlayerAssaultRed.xml</AssaultFile>
<DefenderFile>Schema/Entities/PlayerDefenderRed.xml</DefenderFile>
<SniperFile></SniperFile>
</c:PlayerSpawn>
<c:Spawner>
@@ -115,7 +115,7 @@
<Color A="1" B="1" G="0.254901975" R="0"/>
</c:Model>
<c:Transform>
<Position X="-0.600000024" Y="0" Z="0.549540162"/>
<Position X="0.800000012" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
@@ -128,7 +128,7 @@
<Color A="1" B="1" G="0.254901975" R="0"/>
</c:Model>
<c:Transform>
<Position X="0.800000012" Y="0" Z="0"/>
<Position X="-0.600000024" Y="0" Z="0.549540162"/>
</c:Transform>
</Components>
<Children/>
@@ -130,6 +130,66 @@
</Entity>
</Children>
</Entity>
<Entity name="Lights">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Light_front">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="-0.000288648967" Y="0.000489665952" Z="0.0824639797"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_Side">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Color A="1" B="1" G="1" R="0"/>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
<Radius>0.40000000596046448</Radius>
</c:PointLight>
<c:Transform>
<Position X="-0.0870000049" Y="0.0210000016" Z="0.186000004"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_front2">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="0.000448234321" Y="-0.000760387513" Z="-0.323961914"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="MuzzleFlashBlueSidearm" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.080000000000000002</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children>
<Entity name="Level1">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Cone1Outside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone1Outside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Cone1Inside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone1Inside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Level2">
<Components>
<c:Transform>
<Position X="0.000134464673" Y="8.11116188e-05" Z="-0.0197895896"/>
</c:Transform>
</Components>
<Children>
<Entity name="Cone2Inside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone2Inside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Cone2Outside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone2Outside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Level3">
<Components>
<c:Transform>
<Position X="0.000216802931" Y="0.000130779619" Z="-0.0319075659"/>
</c:Transform>
</Components>
<Children>
<Entity name="PlaneLeft">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneLeft.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="PlaneRight">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneRight.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="PlaneUp">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneUp.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="PlaneDown">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneDown.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Lights">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Light_front">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="-0.000288648967" Y="0.000489665952" Z="0.0824639797"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_Side">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Color A="1" B="1" G="1" R="0"/>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
<Radius>0.40000000596046448</Radius>
</c:PointLight>
<c:Transform>
<Position X="-0.0870000049" Y="0.0210000016" Z="0.186000004"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_front2">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="0.000448234321" Y="-0.000760387513" Z="-0.323961914"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
@@ -435,7 +435,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Assault-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.352941185" G="0.196078435" R="0"/>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0250000004" Y="0.0650000051" Z="0"/>
@@ -455,7 +455,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Defender-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.352941185" G="0.196078435" R="0"/>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0240000002" Y="0.104000002" Z="0"/>
@@ -475,7 +475,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Sniper-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.352941185" G="0.196078435" R="0"/>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0240000002" Y="0.145000011" Z="0"/>
@@ -909,10 +909,10 @@
<c:Transform/>
</Components>
<Children>
<Entity name="DashRight">
<Entity name="DashLeft">
<Components>
<c:Animation>
<AnimationName>DashRightF</AnimationName>
<AnimationName>DashLeftF</AnimationName>
<Time>1</Time>
<Speed>1.7999999523162842</Speed>
<Loop>false</Loop>
@@ -921,10 +921,10 @@
</Components>
<Children/>
</Entity>
<Entity name="DashLeft">
<Entity name="DashRight">
<Components>
<c:Animation>
<AnimationName>DashLeftF</AnimationName>
<AnimationName>DashRightF</AnimationName>
<Time>1</Time>
<Speed>1.7999999523162842</Speed>
<Loop>false</Loop>
+37 -37
View File
@@ -472,7 +472,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Assault-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.352941185" G="0.196078435" R="0"/>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0250000004" Y="0.0650000051" Z="0"/>
@@ -492,7 +492,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Defender-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.352941185" G="0.196078435" R="0"/>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0240000002" Y="0.104000002" Z="0"/>
@@ -512,7 +512,7 @@
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Sniper-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.352941185" G="0.196078435" R="0"/>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0240000002" Y="0.145000011" Z="0"/>
@@ -890,40 +890,6 @@
<c:Transform/>
</Components>
<Children>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ShootgunReloadU</AnimationName>
<Time>0.14583822250136791</Time>
<Speed>0.5</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootRifleU</AnimationName>
<Time>1</Time>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ShieldBlend">
<Components>
<c:Blend>
@@ -959,6 +925,40 @@
</Entity>
</Children>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ShootgunReloadU</AnimationName>
<Time>0.14583822250136791</Time>
<Speed>0.5</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootRifleU</AnimationName>
<Time>1</Time>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="IdleDefender">
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="SidearmWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Shielded/>
<c:Model>
<Resource>Models/Weapons/Red/SecondaryWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="-0.0169804785" Y="-0.0188358482" Z="-0.222064406"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RaySideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0" Y="0.125075191" Z="-0.206788138"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashSideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.0240342002" Y="0.116005458" Z="-0.0419839472"/>
<Scale X="0.5" Y="0.5" Z="0.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
+51 -9
View File
@@ -8,6 +8,7 @@ EditorSystem::EditorSystem(SystemParams params, IRenderer* renderer, RenderFrame
: System(params)
, m_Renderer(renderer)
, m_RenderFrame(renderFrame)
, m_CamVelocity(0.f)
{
m_EditorWorld = new World();
m_EditorWorldSystemPipeline = new SystemPipeline(m_EditorWorld, m_EventBroker, IsClient, IsServer);
@@ -83,14 +84,55 @@ void EditorSystem::Update(double dt)
}
}
m_EditorWorldSystemPipeline->Update(actualDelta);
ComponentWrapper& cameraTransform = m_EditorCamera["Transform"];
Field<glm::vec3> ori = cameraTransform["Orientation"];
ori.x(m_EditorCameraInputController->Rotation().x);
ori.y(m_EditorCameraInputController->Rotation().y);
Field<glm::vec3> pos = cameraTransform["Position"];
pos += m_EditorCameraInputController->Movement() * glm::inverse(glm::quat(ori)) * (float)actualDelta;
}
ComponentWrapper& cameraTransform = m_EditorCamera["Transform"];
Field<glm::vec3> ori = cameraTransform["Orientation"];
glm::vec3 newOri;
newOri.x = glm::mix(ori.x(), m_EditorCameraInputController->Rotation().x, 0.05f);
newOri.y = glm::mix(ori.y(), m_EditorCameraInputController->Rotation().y, 0.05f);
//ori.x(m_EditorCameraInputController->Rotation().x);
//ori.y(m_EditorCameraInputController->Rotation().y);
ori.x(newOri.x);
ori.y(newOri.y);
Field<glm::vec3> pos = cameraTransform["Position"];
auto move = m_EditorCameraInputController->Movement();
const float decreaseAccelleration = 3.75f;
const float increaseAccelleration = 5.25f;
if (move.x == 0) {
m_CamVelocity.x -= m_CamVelocity.x * (float)actualDelta * decreaseAccelleration;
//m_CamVelocity.x -= glm::sign(m_CamVelocity.x) * (float)actualDelta * decreaseAccelleration;
if (glm::abs(m_CamVelocity.x) < 0.01f) {
m_CamVelocity.x = 0;
}
} else {
m_CamVelocity.x += glm::sign(move.x) * (float)actualDelta * increaseAccelleration;
m_CamVelocity.x = glm::max(m_CamVelocity.x, -glm::abs(move.x));
m_CamVelocity.x = glm::min(m_CamVelocity.x, glm::abs(move.x));
}
if (move.y == 0) {
m_CamVelocity.y -= m_CamVelocity.y * (float)actualDelta * decreaseAccelleration;
//m_CamVelocity.y -= glm::sign(m_CamVelocity.y) * (float)actualDelta * decreaseAccelleration;
if (glm::abs(m_CamVelocity.y) < 0.01f) {
m_CamVelocity.y = 0;
}
} else {
m_CamVelocity.y += glm::sign(move.y) * (float)actualDelta * increaseAccelleration;
m_CamVelocity.y = glm::max(m_CamVelocity.y, -glm::abs(move.y));
m_CamVelocity.y = glm::min(m_CamVelocity.y, glm::abs(move.y));
}
if (move.z == 0) {
m_CamVelocity.z -= m_CamVelocity.z * (float)actualDelta * decreaseAccelleration;
//m_CamVelocity.z -= glm::sign(m_CamVelocity.z) * (float)actualDelta * decreaseAccelleration;
if (glm::abs(m_CamVelocity.z) < 0.01f) {
m_CamVelocity.z = 0;
}
} else {
m_CamVelocity.z += glm::sign(move.z) * (float)actualDelta * increaseAccelleration;
m_CamVelocity.z = glm::max(m_CamVelocity.z, -glm::abs(move.z));
m_CamVelocity.z = glm::min(m_CamVelocity.z, glm::abs(move.z));
}
pos += m_CamVelocity * glm::inverse(glm::quat(ori)) * (float)actualDelta;
}
void EditorSystem::Enable()
@@ -117,11 +159,11 @@ void EditorSystem::Enable()
void EditorSystem::Disable()
{
m_EditorCameraInputController->Disable();
//m_EditorCameraInputController->Disable();
m_EventBroker->Publish(Events::LockMouse());
Events::SetCamera e;
e.CameraEntity = m_ActualCamera;
m_EventBroker->Publish(e);
//m_EventBroker->Publish(e);
m_Enabled = false;
}
+1 -1
View File
@@ -184,7 +184,7 @@ bool RenderSystem::isEntityVisible(EntityWrapper& entity)
}
// Hide things parented to local player if they have the HiddenFromLocalPlayer component
bool outOfBodyExperience = false; // ResourceManager::Load<ConfigFile>("Config.ini")->Get<bool>("Debug.OutOfBodyExperience", false);
bool outOfBodyExperience = ResourceManager::Load<ConfigFile>("Config.ini")->Get<bool>("Debug.OutOfBodyExperience", false);
if (
(entity.HasComponent("HiddenForLocalPlayer") || entity.FirstParentWithComponent("HiddenForLocalPlayer").Valid())
&& (entity == m_LocalPlayer || entity.IsChildOf(m_LocalPlayer))
+1
View File
@@ -19,6 +19,7 @@ void Renderer::Initialize()
{
m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0);
m_GLOW_Quality = m_Config->Get<int>("GLOW.Quality", 0);
m_MSAA_Level = m_Config->Get<unsigned int>("MSAA.Level", 0);
InitializeWindow();
InitializeRenderPasses();
+2 -2
View File
@@ -25,9 +25,9 @@ bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
//if player has the boost from a defender, subtract the damage taken by StrengthOfEffect amount
auto playerBoostDefenderEntity = e.Victim.FirstChildByName("BoostDefender");
if (playerBoostDefenderEntity.Valid()) {
e.Damage -= (double)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"];
e.Damage -= (const double&)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"];
}
if (health > 0) {
if (health > 0 && e.Damage > 0) {
health -= e.Damage;
if (health <= 0.0) {
Events::PlayerDeath ePlayerDeath;
+2 -2
View File
@@ -21,7 +21,7 @@ void PlayerMovementSystem::Update(double dt)
{
updateMovementControllers(dt);
// Only do physics calculations on client and only for themselves.
if (IsClient) {
if (IsClient || true) {
if (LocalPlayer.Valid()){
updateVelocity(LocalPlayer, dt);
}
@@ -73,7 +73,7 @@ void PlayerMovementSystem::Update(double dt)
return;
}
for (auto cDash : *pool) {
if (cDash.EntityID != LocalPlayer.ID && (double)cDash["CoolDownMaxTimer"] - (double)cDash["CoolDownTimer"] < 0.5) {
if ((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");