Compare commits

..

6 Commits

Author SHA1 Message Date
William Moberg bc3c8299e8 Moved minidump code to MiniDump.cpp from main. 2016-03-04 03:05:09 +01:00
verysecrethero dc88074f7f Merge remote-tracking branch 'origin/master' into MiniDump 2016-03-03 17:03:06 +01:00
verysecrethero db09d93111 Minidump stage 2 fix 2016-03-03 16:41:47 +01:00
verysecrethero cc34f53b16 Memorydump stage 1 fix 2016-03-03 16:07:35 +01:00
William Moberg 05bbecc452 WIP, minidump is done in another program, started from our app.
The other program is not in git yet.
2016-02-24 17:23:47 +01:00
William Moberg a36deb2cf9 WIP, trying to figure out why minidumps doesn't work. 2016-02-23 18:19:48 +01:00
21 changed files with 2172 additions and 2504 deletions
@@ -30,7 +30,6 @@ public:
void AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID); void AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID);
virtual bool AssaultDashDoubleTapped() const { return m_AssaultDashDoubleTapped; } virtual bool AssaultDashDoubleTapped() const { return m_AssaultDashDoubleTapped; }
virtual bool PlayerIsDashing() const { return m_PlayerIsDashing; } virtual bool PlayerIsDashing() const { return m_PlayerIsDashing; }
bool SpecialAbilityKeyDown() const { return m_SpecialAbilityKeyDown; }
protected: protected:
const int m_PlayerID; const int m_PlayerID;
@@ -146,9 +145,9 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (m_NumberOfMovementKeysDown == 0) { if (m_NumberOfMovementKeysDown == 0) {
m_MovementKeyDown = false; m_MovementKeyDown = false;
} }
//you have just released the key, store what key it was and reset the doubletap-sensitivity-timer //you have just released the key, store what key it was and reset the doubletap-sensitivity-timer
m_AssaultDashTapDirection = m_CurrentDirectionVector; m_AssaultDashTapDirection = m_CurrentDirectionVector;
m_AssaultDashDoubleTapDeltaTime = 0.f; m_AssaultDashDoubleTapDeltaTime = 0.f;
} }
} }
@@ -162,10 +161,17 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
} }
if (e.Command == "SpecialAbility") { if (e.Command == "SpecialAbility") {
m_SpecialAbilityKeyDown = e.Value > 0; if (e.Value > 0) {
m_SpecialAbilityKeyDown = true;
} else {
m_SpecialAbilityKeyDown = false;
}
}
if (m_SpecialAbilityKeyDown && m_MovementKeyDown) {
m_ShiftDashing = true;
} else {
m_ShiftDashing = false;
} }
m_ShiftDashing = m_SpecialAbilityKeyDown && m_MovementKeyDown;
return true; return true;
} }
+2 -1
View File
@@ -2,7 +2,8 @@
#define MiniDump_h__ #define MiniDump_h__
#include <Windows.h> #include <Windows.h>
#include <DbgHelp.h>
void WINAPI Create_Dump(PEXCEPTION_POINTERS pException, BOOL File_Flag, BOOL Show_Flag); long WINAPI Create_Dump_Immediate(LPEXCEPTION_POINTERS pException);
#endif #endif
@@ -30,8 +30,6 @@ private:
bool m_LeftFoot = false; bool m_LeftFoot = false;
// To get a difference when calculating the walking state. // To get a difference when calculating the walking state.
glm::vec3 m_LastPosition = glm::vec3(); glm::vec3 m_LastPosition = glm::vec3();
// Used to track afterimages for sprint effect.
float m_SprintEffectTimer;
// The logic for making the sound play when player is moving // The logic for making the sound play when player is moving
void playerStep(double dt); void playerStep(double dt);
// Spawn a hexagon at origin of an Entity // Spawn a hexagon at origin of an Entity
-1
View File
@@ -28,4 +28,3 @@ P=SwitchToPlayer
K=TakeDamage,1500 K=TakeDamage,1500
F2=PerformanceTimingResetAllTimers F2=PerformanceTimingResetAllTimers
F3=PerformanceTimingCreateExcelData F3=PerformanceTimingCreateExcelData
F4=SwapToClassPick
-1
View File
@@ -59,5 +59,4 @@
<xs:include schemaLocation="Components/CapturePointArrowHUD.xsd"/> <xs:include schemaLocation="Components/CapturePointArrowHUD.xsd"/>
<xs:include schemaLocation="Components/FloatingEffect.xsd"/> <xs:include schemaLocation="Components/FloatingEffect.xsd"/>
<xs:include schemaLocation="Components/BoostIconsHUD.xsd"/> <xs:include schemaLocation="Components/BoostIconsHUD.xsd"/>
<xs:include schemaLocation="Components/InputCmdButton.xsd"/>
</xs:schema> </xs:schema>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<InputCmdButton xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="InputCmdButton.xsd">
<Command></Command>
<PressValue>0.0</PressValue>
</InputCmdButton>
@@ -1,19 +0,0 @@
<?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="InputCmdButton">
<xs:annotation><xs:documentation>Used with a Button component, the button will send an inputCommand event instead of ButtonPressed/Released event.</xs:documentation></xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Command" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>The command name for the inputCommand.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="PressValue" type="t:float" minOccurs="0">
<xs:annotation><xs:documentation>The value in inputCommand.Value that will be sent on button press.</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<SprintAbility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SprintAbility.xsd"> <SprintAbility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SprintAbility.xsd">
<StrengthOfEffect>1.3</StrengthOfEffect> <CoolDownMaxTimer>2.0</CoolDownMaxTimer>
<Active>false</Active>
</SprintAbility> </SprintAbility>
@@ -9,11 +9,8 @@
</xs:annotation> </xs:annotation>
<xs:complexType> <xs:complexType>
<xs:all> <xs:all>
<xs:element name="StrengthOfEffect" type="t:double" minOccurs="0"> <xs:element name="CoolDownMaxTimer" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>This is the strength of the sprint effect</xs:documentation></xs:annotation> <xs:annotation><xs:documentation>This is the cooldown on sprint</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Active" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>True if currently sprinting.</xs:documentation></xs:annotation>
</xs:element> </xs:element>
</xs:all> </xs:all>
</xs:complexType> </xs:complexType>
File diff suppressed because it is too large Load Diff
@@ -1,308 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="OverwatchCamera" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:RaptorCopter>
<Speed>0.049999997019767761</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Position X="0" Y="-4" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="CameraAnchor">
<Components>
<c:Transform>
<Position X="66" Y="59.2180023" Z="0"/>
<Orientation X="5.89000034" Y="1.57079637" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="SpectatorCamera">
<Components>
<c:Camera/>
<c:Transform/>
</Components>
<Children>
<Entity name="SpectatorHUD">
<Components>
<c:Transform>
<Position X="0" Y="0" Z="-0.5"/>
</c:Transform>
</Components>
<Children>
<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>
<GlowMap></GlowMap>
<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>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<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>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<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>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<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>
<Percentage>0.10332605343919568</Percentage>
<Color A="0.699999988" B="0" G="0" R="1"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="4.71238899"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.699999988" B="0" G="0" 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>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="RespawnTimer">
<Components>
<c:Text>
<Content>16</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="1" R="0.784313738"/>
</c:Text>
<c:Transform>
<Position X="0" Y="0.178199276" Z="0"/>
<Scale X="0.0250000004" Y="0.0250000004" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="PickClassCamera">
<Components>
<c:Camera/>
<c:Transform/>
</Components>
<Children>
<Entity name="PickClassHUD">
<Components>
<c:Transform>
<Position X="0" Y="0" Z="-0.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="DefenderClassPick">
<Components>
<c:Button/>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:InputCmdButton>
<Command>PickClass</Command>
<PressValue>2</PressValue>
</c:InputCmdButton>
<c:Transform>
<Position X="0.349999994" Y="0.0500000007" Z="0"/>
<Scale X="0.0799999982" Y="0.0799999982" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AssaultClassPick">
<Components>
<c:Button/>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitRaptor.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:InputCmdButton>
<Command>PickClass</Command>
<PressValue>1</PressValue>
</c:InputCmdButton>
<c:Transform>
<Position X="0.349999994" Y="0.149504215" Z="0"/>
<Scale X="0.0799999982" Y="0.0799999982" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SniperClassPick">
<Components>
<c:Button/>
<c:Sprite>
<DiffuseTexture>Textures/Test/aM4ME4GR.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:InputCmdButton>
<Command>PickClass</Command>
<PressValue>3</PressValue>
</c:InputCmdButton>
<c:Transform>
<Position X="0.349999994" Y="-0.0500000007" Z="0"/>
<Scale X="0.0799999982" Y="0.0799999982" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="SpectatorCamera" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Camera/>
<c:Transform>
<Position X="0" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="SpectatorHUD">
<Components>
<c:Transform>
<Position X="0" Y="0" Z="-0.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="RespawnTimer">
<Components>
<c:Text>
<Content>Time to respawn: 0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="1" R="0.784313738"/>
<Alignment>
<Left/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="-0.115000000" Y="0.15304254" Z="0"/>
<Scale X="0.0250000004" Y="0.0250000004" Z="1"/>
</c:Transform>
</Components>
<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>
<GlowMap></GlowMap>
<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>
<GlowMap></GlowMap>
</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>
<GlowMap></GlowMap>
<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>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
</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>
<GlowMap></GlowMap>
<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>
<GlowMap></GlowMap>
</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>
<GlowMap></GlowMap>
<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>
<Percentage>0.59265931447347009</Percentage>
<Color A="0.699999988" B="0" G="0" R="1"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
</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="4.71238899"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.699999988" B="0" G="0" 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>
<GlowMap></GlowMap>
</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>
</Children>
</Entity>
</Children>
</Entity>
@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="SprintEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Animation>
<AnimationName1></AnimationName1>
<AnimationName2></AnimationName2>
<AnimationName3></AnimationName3>
</c:Animation>
<c:Lifetime>
<Lifetime>0.15</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<Velocity X="0" Y="0" Z="0"/>
<ExplosionDuration>0.15</ExplosionDuration>
</c:ExplosionEffect>
<c:Model>
<Resource></Resource>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
-1
View File
@@ -62,7 +62,6 @@
<xs:element ref="c:DoubleJump" minOccurs="0"/> <xs:element ref="c:DoubleJump" minOccurs="0"/>
<xs:element ref="c:HealthHUD" minOccurs="0"/> <xs:element ref="c:HealthHUD" minOccurs="0"/>
<xs:element ref="c:SpriteIndicator" minOccurs="0"/> <xs:element ref="c:SpriteIndicator" minOccurs="0"/>
<xs:element ref="c:InputCmdButton" minOccurs="0"/>
</xs:all> </xs:all>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
+8 -29
View File
@@ -1,5 +1,4 @@
#include "GUI/ButtonSystem.h" #include "GUI/ButtonSystem.h"
#include "Input/EInputCommand.h"
ButtonSystem::ButtonSystem(SystemParams params, IRenderer* renderer) ButtonSystem::ButtonSystem(SystemParams params, IRenderer* renderer)
: System(params) : System(params)
@@ -38,20 +37,10 @@ bool ButtonSystem::OnMousePress(const Events::MousePress& e)
m_PickEntity = EntityWrapper(m_World, m_PickData.Entity); m_PickEntity = EntityWrapper(m_World, m_PickData.Entity);
//You have clicked on a button entity, send pressed event. //You have clicked on a button entity, send pressed event.
if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) { Events::ButtonPressed ePressed;
Events::InputCommand eInputCmd; ePressed.Entity = m_PickEntity;
eInputCmd.PlayerID = LocalPlayer.ID; ePressed.EntityName = m_PickEntity.Name();
eInputCmd.Player = LocalPlayer; m_EventBroker->Publish(ePressed);
EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity);
eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"];
eInputCmd.Value = (float)button["InputCmdButton"]["PressValue"];
m_EventBroker->Publish(eInputCmd);
} else {
Events::ButtonPressed ePressed;
ePressed.Entity = m_PickEntity;
ePressed.EntityName = m_PickEntity.Name();
m_EventBroker->Publish(ePressed);
}
} }
} }
} }
@@ -66,20 +55,10 @@ bool ButtonSystem::OnMouseRelease(const Events::MouseRelease& e)
if(m_PickData.Entity != EntityID_Invalid && m_PickData.World == m_World) { if(m_PickData.Entity != EntityID_Invalid && m_PickData.World == m_World) {
EntityWrapper ent = EntityWrapper(m_World, m_PickData.Entity); EntityWrapper ent = EntityWrapper(m_World, m_PickData.Entity);
if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) { Events::ButtonReleased eReleased;
Events::InputCommand eInputCmd; eReleased.EntityName = m_PickEntity.Name();
eInputCmd.PlayerID = LocalPlayer.ID; eReleased.Entity = m_PickEntity;
eInputCmd.Player = LocalPlayer; m_EventBroker->Publish(eReleased);
EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity);
eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"];
eInputCmd.Value = 0;
m_EventBroker->Publish(eInputCmd);
} else {
Events::ButtonReleased eReleased;
eReleased.EntityName = m_PickEntity.Name();
eReleased.Entity = m_PickEntity;
m_EventBroker->Publish(eReleased);
}
if(m_World->HasComponent(m_PickData.Entity, "Button")) { if(m_World->HasComponent(m_PickData.Entity, "Button")) {
if (ent == m_PickEntity) { if (ent == m_PickEntity) {
+1 -1
View File
@@ -47,7 +47,7 @@ int UDPClient::readBuffer()
memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int)); memcpy(&sizeOfPacket, m_ReadBuffer, sizeof(int));
if (sizeOfPacket > m_Socket->available()) { if (sizeOfPacket > m_Socket->available()) {
LOG_WARNING("UDPClient::readBuffer(): We haven't got the whole packet yet."); LOG_WARNING("UDPClient::readBuffer(): We haven't got the whole packet yet.");
//return 0; return 0;
} }
// if the buffer is to small increase the size of it // if the buffer is to small increase the size of it
if (sizeOfPacket > m_BufferSize) { if (sizeOfPacket > m_BufferSize) {
+1 -1
View File
@@ -94,7 +94,7 @@ int UDPServer::readBuffer()
if (sizeOfPacket > m_Socket->available()) { if (sizeOfPacket > m_Socket->available()) {
LOG_WARNING("UDPServer::readBuffer(): We haven't got the whole packet yet."); LOG_WARNING("UDPServer::readBuffer(): We haven't got the whole packet yet.");
//return 0; return 0;
} }
// if the buffer is to small increase the size of it // if the buffer is to small increase the size of it
+71 -80
View File
@@ -1,110 +1,101 @@
/* /*
Author: Vladimir Sedach. Inspired by Original Author: Vladimir Sedach.
Purpose: demo of Call Stack creation by our own means, Purpose: demo of Call Stack creation by our own means,
and with MiniDumpWriteDump() function of DbgHelp.dll. and with MiniDumpWriteDump() function of DbgHelp.dll.
*/ */
#include "MiniDump.h"
#include <string>
#include <iostream> #include <iostream>
#include <ctime> #include <ctime>
#include <comdef.h>
#include <windows.h> #pragma optimize("y", off) //generate stack frame pointers for all functions - same as /Oy- in the project
#include <tlhelp32.h> #pragma warning(disable: 4200) //nonstandard extension used : zero-sized array in struct/union
//#include "dbghelp.h" #pragma warning(disable: 4100) //unreferenced formal parameter
//#define DEBUG_DPRINTF 1 //allow d() typedef BOOL(WINAPI * MINIDUMP_WRITE_DUMP)(
//#include "wfun.h" IN HANDLE hProcess,
IN DWORD ProcessId,
#pragma optimize("y", off) //generate stack frame pointers for all functions - same as /Oy- in the project IN HANDLE hFile,
#pragma warning(disable: 4200) //nonstandard extension used : zero-sized array in struct/union IN MINIDUMP_TYPE DumpType,
#pragma warning(disable: 4100) //unreferenced formal parameter IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL
IN PVOID UserStreamParam, OPTIONAL
// In case you don't have dbghelp.h. IN PVOID CallbackParam OPTIONAL
#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) long WINAPI Create_Dump_Immediate(LPEXCEPTION_POINTERS pException)
//************************************************************************************* //*************************************************************************************
// Create dump. // Create dump.
// pException can be either GetExceptionInformation() or NULL. // 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. // Try to get MiniDumpWriteDump() address.
hDbgHelp = LoadLibrary("DBGHELP.DLL"); HMODULE hDbgHelp = LoadLibrary("DBGHELP.DLL");
MiniDumpWriteDump_ = (MINIDUMP_WRITE_DUMP)GetProcAddress(hDbgHelp, "MiniDumpWriteDump"); MINIDUMP_WRITE_DUMP MiniDumpWriteDump_ = (MINIDUMP_WRITE_DUMP)GetProcAddress(hDbgHelp, "MiniDumpWriteDump");
// If MiniDumpWriteDump() of DbgHelp.dll available. // If MiniDumpWriteDump() of DbgHelp.dll available.
if (MiniDumpWriteDump_) if (MiniDumpWriteDump_) {
{ // Get absolute path of current process: C:/ ... /name.exe
HANDLE hDump_File; CHAR Dump_Path[MAX_PATH];
CHAR Dump_Path[MAX_PATH]; GetModuleFileName(NULL, Dump_Path, sizeof(Dump_Path));
std::string path(Dump_Path);
GetModuleFileName(NULL, Dump_Path, sizeof(Dump_Path)); //path of current process // Get current time in a string.
std::time_t t = std::time(NULL); std::time_t t = std::time(NULL);
char tStr[16]; char tStr[16];
std::strftime(tStr, 32, " %a %H-%M-%S", std::localtime(&t)); std::strftime(tStr, ARRAYSIZE(tStr), " %a %H-%M-%S", std::localtime(&t));
std::string time(tStr); std::string time(tStr);
std::string path(Dump_Path); // Remove the .exe from path
path = path.substr(0, path.length() - 4); path = path.substr(0, path.length() - 4);
path += time + ".dmp"; // Add the current time and .dmp
path += "dump" + time + ".dmp";
MINIDUMP_EXCEPTION_INFORMATION M; DWORD procId = GetCurrentProcessId();
M.ThreadId = GetCurrentThreadId(); DWORD threadId = GetCurrentThreadId();
M.ExceptionPointers = pException;
M.ClientPointers = 0;
hDump_File = CreateFile(path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); MINIDUMP_EXCEPTION_INFORMATION M;
M.ThreadId = threadId;
M.ExceptionPointers = pException;
M.ClientPointers = TRUE;
MiniDumpWriteDump_(GetCurrentProcess(), GetCurrentProcessId(), hDump_File, HANDLE hDump_File = CreateFile(path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
MiniDumpNormal, (pException) ? &M : NULL, NULL, NULL); HANDLE process = GetCurrentProcess();
CloseHandle(hDump_File); BOOL result = MiniDumpWriteDump_(process, procId, hDump_File
, (MINIDUMP_TYPE)(MiniDumpWithDataSegs |
MiniDumpWithHandleData |
MiniDumpScanMemory |
MiniDumpWithUnloadedModules |
MiniDumpWithIndirectlyReferencedMemory |
MiniDumpWithPrivateReadWriteMemory |
MiniDumpWithFullMemoryInfo |
MiniDumpWithThreadInfo |
MiniDumpIgnoreInaccessibleMemory)
, &M, NULL, NULL);
HRESULT error = (HRESULT)GetLastError();
std::cout << "Memory dumped to: \"" << path.c_str() << "\""; CloseHandle(hDump_File);
MessageBox(NULL, ("Application crashed, memory dumped to: " + path).c_str(), "MiniDump", MB_ICONHAND | MB_OK); if (!result) {
_com_error cErr(error);
HRESULT actualErrorCode = error & 0xFFFF;
char hexErrBuf[16];
std::sprintf(hexErrBuf, "0x%x", actualErrorCode);
std::cout << "Bad memory dump at: \"" << path.c_str() << "\"" << std::endl
<< "because MiniDumpWriteDump failed with error #" << actualErrorCode << " (" << hexErrBuf << "): \"" << cErr.ErrorMessage() << "\"" << std::endl;
MessageBox(NULL, "Application crashed, memory dump failed, but file was created.", "MiniDump", MB_ICONHAND | MB_OK);
} else {
std::cout << "Memory dumped to: \"" << path.c_str() << "\"" << std::endl;
MessageBox(NULL, ("Application crashed, memory dumped to: " + path).c_str(), "MiniDump", MB_ICONHAND | MB_OK);
}
} else { } else {
MessageBox(NULL, "Application crashed, memory dump failed.", "MiniDump", MB_ICONHAND | MB_OK); std::cout << "Memory dump failed because MiniDumpWriteDump is not available." << std::endl;
MessageBox(NULL, "Application crashed, could not create a memory dump.", "MiniDump", MB_ICONHAND | MB_OK);
} }
// Basically, terminate the application.
return EXCEPTION_EXECUTE_HANDLER;
} }
+3 -55
View File
@@ -2,7 +2,6 @@
PlayerMovementSystem::PlayerMovementSystem(SystemParams params) PlayerMovementSystem::PlayerMovementSystem(SystemParams params)
: System(params) : System(params)
, m_SprintEffectTimer(0.f)
{ {
EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &PlayerMovementSystem::OnPlayerSpawned); EVENT_SUBSCRIBE_MEMBER(m_EPlayerSpawned, &PlayerMovementSystem::OnPlayerSpawned);
EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &PlayerMovementSystem::OnDoubleJump); EVENT_SUBSCRIBE_MEMBER(m_EDoubleJump, &PlayerMovementSystem::OnDoubleJump);
@@ -20,48 +19,8 @@ void PlayerMovementSystem::Update(double dt)
{ {
updateMovementControllers(dt); updateMovementControllers(dt);
// Only do physics calculations on client and only for themselves. // Only do physics calculations on client and only for themselves.
if (IsClient) { if (IsClient && LocalPlayer.Valid()) {
if (LocalPlayer.Valid()){ updateVelocity(LocalPlayer, dt);
updateVelocity(LocalPlayer, dt);
}
m_SprintEffectTimer += dt;
if (m_SprintEffectTimer < 0.016f) {
return;
}
m_SprintEffectTimer = 0.f;
const ComponentPool* 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"];
((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"];
}
}
} }
} }
@@ -103,15 +62,7 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
playerMovementSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"]; playerMovementSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
playerCrouchSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"]; playerCrouchSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
} }
bool sniperSprinting = false;
if (player.HasComponent("SprintAbility")) {
(bool)player["SprintAbility"]["Active"] = controller->SpecialAbilityKeyDown();
if (controller->SpecialAbilityKeyDown()) {
playerMovementSpeed *= (double)player["SprintAbility"]["StrengthOfEffect"];
playerCrouchSpeed *= (double)player["SprintAbility"]["StrengthOfEffect"];
sniperSprinting = true;
}
}
if (player.HasComponent("Physics")) { if (player.HasComponent("Physics")) {
ComponentWrapper cPhysics = player["Physics"]; ComponentWrapper cPhysics = player["Physics"];
@@ -167,9 +118,6 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
if (playerBoostAssaultEntity.Valid()) { if (playerBoostAssaultEntity.Valid()) {
accelerationSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"]; accelerationSpeed *= (double)playerBoostAssaultEntity["BoostAssault"]["StrengthOfEffect"];
} }
if (sniperSprinting) {
accelerationSpeed *= (double)player["SprintAbility"]["StrengthOfEffect"];
}
velocity += accelerationSpeed * wishDirection; velocity += accelerationSpeed * wishDirection;
ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity)); ImGui::Text("velocity: (%f, %f, %f) |%f|", velocity.x, velocity.y, velocity.z, glm::length(velocity));
} }
+5 -14
View File
@@ -105,7 +105,7 @@ void PlayerSpawnSystem::Update(double dt)
bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e) bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
{ {
if (e.Command != "PickTeam" && e.Command != "SwapToClassPick") { if (e.Command != "PickTeam") {
return false; return false;
} }
@@ -113,12 +113,11 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
return false; return false;
} }
// A dead client should be able to swap to the overwatch camera. // A dead client should be able to swap to the spectator camera.
if (IsClient && !LocalPlayer.Valid()) { if (IsClient && !LocalPlayer.Valid()) {
// Set the camera as active, if it exists. // Set the spectator camera as active, if it exists.
// Find the respawn camera or class pick camera. // Find the camera.
std::string camName = e.Command == "SwapToClassPick" ? "PickClassCamera" : "SpectatorCamera"; EntityWrapper spectatorCam = m_World->GetFirstEntityByName("SpectatorCamera");
EntityWrapper spectatorCam = m_World->GetFirstEntityByName(camName);
if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) { if (spectatorCam.Valid() && spectatorCam.HasComponent("Camera")) {
Events::SetCamera eSetCamera; Events::SetCamera eSetCamera;
eSetCamera.CameraEntity = spectatorCam; eSetCamera.CameraEntity = spectatorCam;
@@ -136,18 +135,10 @@ bool PlayerSpawnSystem::OnInputCommand(Events::InputCommand& e)
auto iter = m_SpawnRequests.begin(); auto iter = m_SpawnRequests.begin();
for (; iter != m_SpawnRequests.end(); ++iter) { for (; iter != m_SpawnRequests.end(); ++iter) {
if (iter->PlayerID == e.PlayerID) { if (iter->PlayerID == e.PlayerID) {
// If player wants to switch class, remove their spawn request.
if (e.Command == "SwapToClassPick") {
m_SpawnRequests.erase(iter);
}
break; break;
} }
} }
if (e.Command == "SwapToClassPick") {
return true;
}
if (iter != m_SpawnRequests.end()) { if (iter != m_SpawnRequests.end()) {
// If player is in queue to spawn, then change their team affiliation in the request. // If player is in queue to spawn, then change their team affiliation in the request.
iter->Team = (ComponentInfo::EnumType)e.Value; iter->Team = (ComponentInfo::EnumType)e.Value;
+4 -15
View File
@@ -1,27 +1,16 @@
#include "Game.h" #include "Game.h"
#include "MiniDump.h" #include "MiniDump.h"
LONG WINAPI CrashHandler(EXCEPTION_POINTERS* pException);
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
::SetUnhandledExceptionFilter(CrashHandler); SetUnhandledExceptionFilter(Create_Dump_Immediate);
Game game(argc, argv); Game game(argc, argv);
while (game.Running()) { while (game.Running()) {
PerformanceTimer::StartTimer("Game-Tick"); PerformanceTimer::StartTimer("Game-Tick");
game.Tick(); game.Tick();
PerformanceTimer::StopTimer("Game-Tick"); PerformanceTimer::StopTimer("Game-Tick");
} }
return 0; 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
} }