-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb7b304
commit 4762fa8
Showing
7 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "includes.h" | ||
|
||
void CFeatureTakeOneHP::Init() | ||
{ | ||
CChaosFeature::Init(); | ||
} | ||
|
||
void CFeatureTakeOneHP::ActivateFeature() | ||
{ | ||
CChaosFeature::ActivateFeature(); | ||
|
||
UTIL_TakeDamage((*sv_player)->v, 1.0f, DMG_GENERIC); | ||
UTIL_ScreenFade((*sv_player), Vector(192, 0, 0), 0.5f, 0.1f, 128, FFADE_IN); | ||
ma_engine_play_sound(&miniAudio, "valve/sound/player/pl_pain2.wav", NULL); | ||
} | ||
|
||
void CFeatureTakeOneHP::DeactivateFeature() | ||
{ | ||
CChaosFeature::DeactivateFeature(); | ||
} | ||
|
||
const char* CFeatureTakeOneHP::GetFeatureName() | ||
{ | ||
return "Take 1 HP"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright - ScriptedSnark, 2024. | ||
* CFeatureTakeOneHP.h | ||
* | ||
* Project (GSChaos) header file | ||
* Authors: ScriptedSnark. | ||
* Do not delete this comment block. Respect others' work! | ||
*/ | ||
|
||
#ifdef CFEATURETAKEONEHP_H_RECURSE_GUARD | ||
#error Recursive header files inclusion detected in CFeatureTakeOneHP.h | ||
#else //CFEATURETAKEONEHP_H_RECURSE_GUARD | ||
|
||
#define CFEATURETAKEONEHP_H_RECURSE_GUARD | ||
|
||
#ifndef CFEATURETAKEONEHP_H_GUARD | ||
#define CFEATURETAKEONEHP_H_GUARD | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
|
||
class CFeatureTakeOneHP : public CChaosFeature | ||
{ | ||
void Init() override; | ||
void ActivateFeature() override; | ||
void DeactivateFeature() override; | ||
const char* GetFeatureName() override; | ||
}; | ||
|
||
#else //!__cplusplus | ||
#error C++ compiler required to compile CFeatureTakeOneHP.h | ||
#endif //__cplusplus | ||
|
||
#endif //CFEATURETAKEONEHP_H_GUARD | ||
|
||
#undef CFEATURETAKEONEHP_H_RECURSE_GUARD | ||
#endif //CFEATURETAKEONEHP_H_RECURSE_GUARD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters