-
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
cf0651f
commit 1cd58d4
Showing
7 changed files
with
93 additions
and
4 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,40 @@ | ||
#include "includes.h" | ||
|
||
void CFeatureNotarget::Init() | ||
{ | ||
CChaosFeature::Init(); | ||
} | ||
|
||
void CFeatureNotarget::ActivateFeature() | ||
{ | ||
CChaosFeature::ActivateFeature(); | ||
(*sv_player)->v.flags |= FL_NOTARGET; | ||
} | ||
|
||
void CFeatureNotarget::DeactivateFeature() | ||
{ | ||
CChaosFeature::DeactivateFeature(); | ||
(*sv_player)->v.flags &= ~FL_NOTARGET; | ||
} | ||
|
||
void CFeatureNotarget::OnFrame(double time) | ||
{ | ||
if (!IsActive()) | ||
return; | ||
|
||
if (!(*sv_player)) | ||
return; | ||
|
||
(*sv_player)->v.flags |= FL_NOTARGET; | ||
} | ||
|
||
void CFeatureNotarget::ResetStates() | ||
{ | ||
if ((*sv_player)->v.flags & FL_NOTARGET) | ||
(*sv_player)->v.flags &= ~FL_NOTARGET; | ||
} | ||
|
||
const char* CFeatureNotarget::GetFeatureName() | ||
{ | ||
return "Notarget"; | ||
} |
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,39 @@ | ||
/** | ||
* Copyright - ScriptedSnark, 2024. | ||
* CFeatureNotarget.h | ||
* | ||
* Project (GSChaos) header file | ||
* Authors: ScriptedSnark. | ||
* Do not delete this comment block. Respect others' work! | ||
*/ | ||
|
||
#ifdef CFEATURENOTARGET_H_RECURSE_GUARD | ||
#error Recursive header files inclusion detected in CFeatureNotarget.h | ||
#else //CFEATURENOTARGET_H_RECURSE_GUARD | ||
|
||
#define CFEATURENOTARGET_H_RECURSE_GUARD | ||
|
||
#ifndef CFEATURENOTARGET_H_GUARD | ||
#define CFEATURENOTARGET_H_GUARD | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
|
||
class CFeatureNotarget : public CChaosFeature | ||
{ | ||
void Init() override; | ||
void ActivateFeature() override; | ||
void DeactivateFeature() override; | ||
void OnFrame(double time) override; | ||
const char* GetFeatureName() override; | ||
void ResetStates() override; | ||
}; | ||
|
||
#else //!__cplusplus | ||
#error C++ compiler required to compile CFeatureNotarget.h | ||
#endif //__cplusplus | ||
|
||
#endif //CFEATURENOTARGET_H_GUARD | ||
|
||
#undef CFEATURENOTARGET_H_RECURSE_GUARD | ||
#endif //CFEATURENOTARGET_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