Added mp_parasiteonmap playtest cvar

This commit is contained in:
pierow 2023-08-22 22:21:39 -04:00
parent 97ea2a098c
commit 93d134dca4
4 changed files with 13 additions and 0 deletions

View file

@ -126,6 +126,7 @@ cvar_t avh_version = {kvVersion, "330", FCVAR_SERVER};
//playtest cvars
cvar_t avh_fastjp = {kvfastjp, "0", FCVAR_SERVER};
cvar_t avh_randomrfk = {kvRandomRfk, "1", FCVAR_SERVER};
cvar_t avh_parasiteonmap = {kvParasiteOnMap, "0", FCVAR_SERVER };
#ifdef DEBUG
cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER};
@ -241,6 +242,7 @@ void GameDLLInit( void )
//playtest cvars
CVAR_REGISTER (&avh_fastjp);
CVAR_REGISTER (&avh_randomrfk);
CVAR_REGISTER (&avh_parasiteonmap);
// TODO: Remove
CVAR_REGISTER (&avh_ironman);

View file

@ -341,6 +341,7 @@ AvHGamerules::AvHGamerules() : mTeamA(TEAM_ONE), mTeamB(TEAM_TWO)
//playtest cvars
RegisterServerVariable(&avh_fastjp);
RegisterServerVariable(&avh_randomrfk);
RegisterServerVariable(&avh_parasiteonmap);
g_VoiceGameMgr.Init(&gVoiceHelper, gpGlobals->maxClients);

View file

@ -99,6 +99,7 @@ extern cvar_t avh_version;
//playtest cvars
extern cvar_t avh_fastjp;
extern cvar_t avh_randomrfk;
extern cvar_t avh_parasiteonmap;
char *ns_cvar_string(const cvar_t *cvar);
int ns_cvar_int(const cvar_t *cvar);
@ -151,4 +152,5 @@ float ns_cvar_float(const cvar_t *cvar);
//playtest cvars
#define kvfastjp "sv_fastjp"
#define kvRandomRfk "mp_randomresfromkill"
#define kvParasiteOnMap "mp_parasiteonmap"
#endif

View file

@ -47,6 +47,8 @@ AvHUmbraCloudListType gUmbraCloudList;
const float kMovementVisibilityThreshold = 10.0f;
extern cvar_t avh_parasiteonmap;
bool AvHSUGetInViewOfEnemy(CBaseEntity* inEntity, int& outSightedStatus)
{
bool theInViewOfEnemy = false;
@ -182,6 +184,12 @@ bool AvHSUGetInViewOfEnemy(CBaseEntity* inEntity, int& outSightedStatus)
theInViewOfEnemy = true;
}
}
// 2023 - Testing parasite detecting entities.
if (GetHasUpgrade(inEntity->pev->iuser4, MASK_PARASITED) && avh_parasiteonmap.value)
{
outSightedStatus |= MASK_VIS_DETECTED;
theInViewOfEnemy = true;
}
}
}
}