Skip to content

Commit

Permalink
Add "Long Jump" effect
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptedSnark committed Apr 13, 2024
1 parent 9a5b324 commit 7b17870
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions GSChaos/CChaos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ void CChaos::FeatureInit()
RegisterChaosFeature<CFeatureDisableChaosUI>();
RegisterChaosFeature<CFeatureRandomFog>();
RegisterChaosFeature<CFeatureWorstBhopCap>();
RegisterChaosFeature<CFeatureLongJump>();

// must be last
RegisterChaosFeature<CFeatureCombineEffects>();
Expand Down
27 changes: 27 additions & 0 deletions GSChaos/CFeatureLongJump.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "includes.h"

void CFeatureLongJump::Init()
{
CChaosFeature::Init();
}

void CFeatureLongJump::ActivateFeature()
{
CChaosFeature::ActivateFeature();
}

void CFeatureLongJump::DeactivateFeature()
{
CChaosFeature::DeactivateFeature();
}

void CFeatureLongJump::PM_Jump()
{
g_svpmove->velocity.x *= 2.0f;
g_svpmove->velocity.y *= 2.0f;
}

const char* CFeatureLongJump::GetFeatureName()
{
return "Long Jump";
}
38 changes: 38 additions & 0 deletions GSChaos/CFeatureLongJump.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Copyright - ScriptedSnark, 2024.
* CFeatureLongJump.h
*
* Project (GSChaos) header file
* Authors: ScriptedSnark.
* Do not delete this comment block. Respect others' work!
*/

#ifdef CFEATURELONGJUMP_H_RECURSE_GUARD
#error Recursive header files inclusion detected in CFeatureLongJump.h
#else //CFEATURELONGJUMP_H_RECURSE_GUARD

#define CFEATURELONGJUMP_H_RECURSE_GUARD

#ifndef CFEATURELONGJUMP_H_GUARD
#define CFEATURELONGJUMP_H_GUARD
#pragma once

#ifdef __cplusplus

class CFeatureLongJump : public CChaosFeature
{
void Init() override;
void ActivateFeature() override;
void DeactivateFeature() override;
void PM_Jump() override;
const char* GetFeatureName() override;
};

#else //!__cplusplus
#error C++ compiler required to compile CFeatureLongJump.h
#endif //__cplusplus

#endif //CFEATURELONGJUMP_H_GUARD

#undef CFEATURELONGJUMP_H_RECURSE_GUARD
#endif //CFEATURELONGJUMP_H_RECURSE_GUARD
2 changes: 2 additions & 0 deletions GSChaos/GSChaos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
<ClCompile Include="CFeatureHL2Movement.cpp" />
<ClCompile Include="CFeatureHorrorAudio.cpp" />
<ClCompile Include="CFeatureInsaneStepsize.cpp" />
<ClCompile Include="CFeatureLongJump.cpp" />
<ClCompile Include="CFeatureLowFOV.cpp" />
<ClCompile Include="CFeatureMakeItBunDem.cpp" />
<ClCompile Include="CFeatureMLGAudio.cpp" />
Expand Down Expand Up @@ -298,6 +299,7 @@
<ClInclude Include="CFeatureHL2Movement.h" />
<ClInclude Include="CFeatureHorrorAudio.h" />
<ClInclude Include="CFeatureInsaneStepsize.h" />
<ClInclude Include="CFeatureLongJump.h" />
<ClInclude Include="CFeatureLowFOV.h" />
<ClInclude Include="CFeatureMakeItBunDem.h" />
<ClInclude Include="CFeatureMLGAudio.h" />
Expand Down
6 changes: 6 additions & 0 deletions GSChaos/GSChaos.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@
<ClCompile Include="CFeatureWorstBhopCap.cpp">
<Filter>Effects</Filter>
</ClCompile>
<ClCompile Include="CFeatureLongJump.cpp">
<Filter>Effects</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="includes.h" />
Expand Down Expand Up @@ -801,6 +804,9 @@
<ClInclude Include="CFeatureWorstBhopCap.h">
<Filter>Effects</Filter>
</ClInclude>
<ClInclude Include="CFeatureLongJump.h">
<Filter>Effects</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Hooking">
Expand Down
2 changes: 1 addition & 1 deletion GSChaos/includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ extern bool g_bEncrypted;
#include "CFeatureDisableChaosUI.h"
#include "CFeatureRandomFog.h"
#include "CFeatureWorstBhopCap.h"

#include "CFeatureLongJump.h"

#include "CFeatureCombineEffects.h"
#include "CFeature10Effects.h"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ If you don't want to play with this feature, rename `twitch.ini` to `twitch_DISA
> Disable Chaos UI
> Random fog
> Worst Bhop Cap
> Long Jump
> Combine Effects ( 3 in 1 )
> Let's make it more chaotic
```
Expand Down

0 comments on commit 7b17870

Please sign in to comment.