Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b8222c7b2e | |||
| 3e4b87da7c | |||
| ac9ce8ea83 | |||
| 99643fd748 | |||
| 8f28c760dd | |||
| b13362360a | |||
| 0af9edc6e5 | |||
| ec10ef3ffc | |||
| 969e7cb0d5 | |||
| 47a365a8fc | |||
| 71c03326aa | |||
| ba69c79821 | |||
| 0a31fa3dfd | |||
| ca457d9c00 | |||
| a08e54a147 | |||
| 2c3122bbdb | |||
| 10846be820 | |||
| 7d732c75ca | |||
| 503613907e |
@@ -202,7 +202,7 @@ void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool
|
||||
}
|
||||
|
||||
//dashing with shift
|
||||
if (m_ShiftDashing && m_AssaultDashCoolDownTimer <= 0.0f && !isJumping) {
|
||||
if (m_ShiftDashing && m_AssaultDashCoolDownTimer <= 0.0f) {
|
||||
//player is dashing with shift
|
||||
//the wanted-direction is set in playermovement already so we dont need to check what direction we want to dash in!
|
||||
m_AssaultDashCoolDownTimer = assaultDashCoolDownMaxTimer;
|
||||
@@ -227,7 +227,7 @@ void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool
|
||||
}
|
||||
m_ValidDoubleTap = false;
|
||||
|
||||
if (!(m_AssaultDashCoolDownTimer <= 0.0f && !isJumping)) {
|
||||
if (!(m_AssaultDashCoolDownTimer <= 0.0f)) {
|
||||
//if we cant dash at the moment, then just reset the tap-sensitivity-timer
|
||||
m_AssaultDashDoubleTapDeltaTime = 0.f;
|
||||
return;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -5,10 +5,15 @@
|
||||
<c:AABB/>
|
||||
<c:AmmoPickup/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitSphere.mesh</Resource>
|
||||
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:RaptorCopter>
|
||||
<Speed>0.1</Speed>
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="1" Z="0"/>
|
||||
<Scale X="0.3" Y="0.3" Z="0.3"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
|
||||
@@ -5,10 +5,15 @@
|
||||
<c:AABB/>
|
||||
<c:HealthPickup/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitSphere.mesh</Resource>
|
||||
<Resource>Models/Props/PickUps/HealthPickUp.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:RaptorCopter>
|
||||
<Speed>0.1</Speed>
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="1" Z="0"/>
|
||||
<Scale X="0.3" Y="0.3" Z="0.3"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
|
||||
@@ -593,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>
|
||||
@@ -726,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>
|
||||
@@ -739,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>
|
||||
@@ -1291,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>
|
||||
@@ -1302,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/>
|
||||
@@ -1314,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/>
|
||||
@@ -1326,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/>
|
||||
@@ -3310,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>
|
||||
@@ -3319,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>
|
||||
@@ -3349,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>
|
||||
@@ -3698,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>
|
||||
@@ -3948,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/>
|
||||
@@ -4671,6 +4765,7 @@
|
||||
<HomePointForTeam>
|
||||
<Blue/>
|
||||
</HomePointForTeam>
|
||||
<CapturePointNumber>4</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCylinder.mesh</Resource>
|
||||
@@ -4706,7 +4801,7 @@
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:CapturePoint>
|
||||
<CapturePointNumber>1</CapturePointNumber>
|
||||
<CapturePointNumber>3</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCylinder.mesh</Resource>
|
||||
@@ -4771,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>
|
||||
@@ -4806,7 +4901,6 @@
|
||||
<HomePointForTeam>
|
||||
<Red/>
|
||||
</HomePointForTeam>
|
||||
<CapturePointNumber>4</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCylinder.mesh</Resource>
|
||||
@@ -4925,7 +5019,7 @@
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Position X="-60.3695679" Y="2.14482641" Z="-79.3789597"/>
|
||||
<Position X="-60.3695679" Y="5.64500046" Z="-79.3789597"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -4995,7 +5089,7 @@
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Position X="60.0169258" Y="2.37972379" Z="76.2893906"/>
|
||||
<Position X="60.0169258" Y="5.78000021" Z="76.2893906"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -5071,7 +5165,7 @@
|
||||
<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="22.6496716" Z="0"/>
|
||||
<Orientation X="0" Y="75.6124268" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5090,7 +5184,7 @@
|
||||
<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="19.304081" Z="0"/>
|
||||
<Orientation X="0" Y="72.2667694" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5109,7 +5203,7 @@
|
||||
<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="16.9120293" Z="0"/>
|
||||
<Orientation X="0" Y="69.8748016" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5128,7 +5222,7 @@
|
||||
<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="17.2259693" Z="0"/>
|
||||
<Orientation X="0" Y="70.1887283" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5147,7 +5241,7 @@
|
||||
<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="16.6746445" Z="0"/>
|
||||
<Orientation X="0" Y="69.6374512" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5166,7 +5260,7 @@
|
||||
<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="14.8039036" Z="0"/>
|
||||
<Orientation X="0" Y="67.7666702" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5185,7 +5279,7 @@
|
||||
<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="13.8527527" Z="0"/>
|
||||
<Orientation X="0" Y="66.8154602" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
@@ -5204,7 +5298,7 @@
|
||||
<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="11.0639687" Z="0"/>
|
||||
<Orientation X="0" Y="64.0265808" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
<Blue/>
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0288832653" Z="0"/>
|
||||
</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>
|
||||
@@ -504,7 +488,6 @@
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
||||
<Color A="1" B="1" G="0.309803933" R="0"/>
|
||||
<Visible>false</Visible>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -574,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>
|
||||
|
||||
@@ -35,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>
|
||||
@@ -571,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.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>
|
||||
|
||||
@@ -40,8 +40,11 @@ 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();
|
||||
} else {
|
||||
Disable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -436,7 +436,11 @@ bool Client::OnPlayerSpawned(const Events::PlayerSpawned& e)
|
||||
void Client::parsePlayerDamage(Packet& packet)
|
||||
{
|
||||
Events::PlayerDamage e;
|
||||
e.Inflictor = EntityWrapper(m_World, m_ServerIDToClientID.at(packet.ReadPrimitive<EntityID>()));
|
||||
PlayerID victimID = packet.ReadPrimitive<EntityID>();
|
||||
if(serverClientMapsHasEntity(victimID)){
|
||||
return;
|
||||
}
|
||||
e.Inflictor = EntityWrapper(m_World, m_ServerIDToClientID.at(victimID));
|
||||
e.Victim = EntityWrapper(m_World, m_ServerIDToClientID.at(packet.ReadPrimitive<EntityID>()));
|
||||
e.Damage = packet.ReadPrimitive<double>();
|
||||
// Don't rebroadcast our own player damage events or we'll have an infinite loop!
|
||||
|
||||
@@ -335,6 +335,7 @@ void Server::disconnect(PlayerID playerID)
|
||||
//m_World->DeleteEntity(m_ConnectedPlayers[playerID].EntityID);
|
||||
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.
|
||||
}
|
||||
@@ -476,6 +477,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>();
|
||||
@@ -485,7 +491,6 @@ void Server::parsePlayerTransform(Packet& packet)
|
||||
orientation.y = packet.ReadPrimitive<float>();
|
||||
orientation.z = packet.ReadPrimitive<float>();
|
||||
|
||||
PlayerID playerID = GetPlayerIDFromEndpoint();
|
||||
bool hasAssaultWeapon = packet.ReadPrimitive<bool>();
|
||||
int magazineAmmo;
|
||||
int ammo;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -15,6 +15,7 @@ bool MultiplayerSnapshotFilter::FilterComponent(EntityWrapper entity, SharedComp
|
||||
|| component.Info.Name == "AssaultWeapon"
|
||||
|| component.Info.Name == "Animation"
|
||||
|| component.Info.Name == "AnimationOffset"
|
||||
|| entity.Name() == "PlayerName"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ bool DamageIndicatorSystem::OnPlayerDamage(Events::PlayerDamage& e)
|
||||
//if (e.Victim != LocalPlayer) {
|
||||
// return false;
|
||||
//}
|
||||
if (e.Victim != LocalPlayer && !e.Victim.IsChildOf(LocalPlayer)) {
|
||||
if (e.Victim.Valid() && e.Victim != LocalPlayer && !e.Victim.IsChildOf(LocalPlayer)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,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);
|
||||
|
||||
@@ -79,18 +79,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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -181,10 +181,10 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e)
|
||||
return false;
|
||||
}
|
||||
|
||||
SpawnRequest req;
|
||||
req.PlayerID = m_PlayerIDs.at(e.Player.ID);
|
||||
req.Team = cTeam["Team"];
|
||||
m_SpawnRequests.push_back(req);
|
||||
SpawnRequest req;
|
||||
req.PlayerID = m_PlayerIDs.at(e.Player.ID);
|
||||
req.Team = cTeam["Team"];
|
||||
m_SpawnRequests.push_back(req);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user