-
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
f4d7c2c
commit 3cb9442
Showing
9 changed files
with
111 additions
and
9 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,42 @@ | ||
#include "includes.h" | ||
|
||
void CFeatureMonsterWorldspawn::Init() | ||
{ | ||
CChaosFeature::Init(); | ||
} | ||
|
||
void CFeatureMonsterWorldspawn::ActivateFeature() | ||
{ | ||
CChaosFeature::ActivateFeature(); | ||
|
||
monster_worldspawn = CREATE_NAMED_ENTITY(MAKE_STRING("func_wall")); | ||
|
||
if (!monster_worldspawn) | ||
{ | ||
DeactivateFeature(); | ||
return; | ||
} | ||
|
||
SET_MODEL(monster_worldspawn, pEngfuncs->pfnGetLevelName()); | ||
|
||
gEntityInterface->pfnSpawn(monster_worldspawn); | ||
|
||
monster_worldspawn->v.origin = (*sv_player)->v.origin; | ||
monster_worldspawn->v.solid = SOLID_BSP; | ||
monster_worldspawn->v.movetype = MOVETYPE_PUSH; | ||
} | ||
|
||
void CFeatureMonsterWorldspawn::DeactivateFeature() | ||
{ | ||
CChaosFeature::DeactivateFeature(); | ||
} | ||
|
||
const char* CFeatureMonsterWorldspawn::GetFeatureName() | ||
{ | ||
return "monster_worldspawn"; | ||
} | ||
|
||
edict_t* CFeatureMonsterWorldspawn::GetWorldspawnEdict() | ||
{ | ||
return monster_worldspawn; | ||
} |
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 @@ | ||
/** | ||
* Copyright - ScriptedSnark, 2024. | ||
* CFeatureMonsterWorldspawn.h | ||
* | ||
* Project (GSChaos) header file | ||
* Authors: ScriptedSnark. | ||
* Do not delete this comment block. Respect others' work! | ||
*/ | ||
|
||
#ifdef CFEATUREMONSTERWORLDSPAWN_H_RECURSE_GUARD | ||
#error Recursive header files inclusion detected in CFeatureMonsterWorldspawn.h | ||
#else //CFEATUREMONSTERWORLDSPAWN_H_RECURSE_GUARD | ||
|
||
#define CFEATUREMONSTERWORLDSPAWN_H_RECURSE_GUARD | ||
|
||
#ifndef CFEATUREMONSTERWORLDSPAWN_H_GUARD | ||
#define CFEATUREMONSTERWORLDSPAWN_H_GUARD | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
|
||
class CFeatureMonsterWorldspawn : public CChaosFeature | ||
{ | ||
void Init() override; | ||
void ActivateFeature() override; | ||
void DeactivateFeature() override; | ||
const char* GetFeatureName() override; | ||
virtual edict_t* GetWorldspawnEdict(); | ||
private: | ||
edict_t* monster_worldspawn; | ||
}; | ||
|
||
#else //!__cplusplus | ||
#error C++ compiler required to compile CFeatureMonsterWorldspawn.h | ||
#endif //__cplusplus | ||
|
||
#endif //CFEATUREMONSTERWORLDSPAWN_H_GUARD | ||
|
||
#undef CFEATUREMONSTERWORLDSPAWN_H_RECURSE_GUARD | ||
#endif //CFEATUREMONSTERWORLDSPAWN_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
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