mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 15:21:54 +00:00
o Parasite can't cause 'the enemy approaches' alert.
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@476 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
6cf91edff3
commit
d460818621
3 changed files with 13 additions and 11 deletions
|
@ -977,7 +977,7 @@ BOOL AvHGamerules::FPlayerCanRespawn( CBasePlayer *pPlayer )
|
|||
return theCanRespawn;
|
||||
}
|
||||
|
||||
bool AvHGamerules::CanEntityDoDamageTo(const CBaseEntity* inAttacker, const CBaseEntity* inReceiver, float* outScalar)
|
||||
bool AvHGamerules::CanEntityDoDamageTo(const CBaseEntity* inAttacker, const CBaseEntity* inReceiver, float* outScalar, bool triggerHiveDefend)
|
||||
{
|
||||
bool theCanDoDamage = false;
|
||||
|
||||
|
@ -1072,6 +1072,7 @@ bool AvHGamerules::CanEntityDoDamageTo(const CBaseEntity* inAttacker, const CBas
|
|||
*outScalar = theScalar;
|
||||
}
|
||||
|
||||
if ( triggerHiveDefend ) {
|
||||
if(!theTeamsAreDifferent && !AvHSUGetIsExternalClassName(STRING(inReceiver->pev->classname)) && theGameHasStarted )
|
||||
{
|
||||
AvHHive *theHive=(AvHHive *)dynamic_cast<const AvHHive *>(inReceiver);
|
||||
|
@ -1081,6 +1082,7 @@ bool AvHGamerules::CanEntityDoDamageTo(const CBaseEntity* inAttacker, const CBas
|
|||
GetGameRules()->TriggerAlert((AvHTeamNumber)inAttacker->pev->team, ALERT_HIVE_DEFEND, theHive->entindex());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return theCanDoDamage;
|
||||
|
|
|
@ -186,7 +186,7 @@ public:
|
|||
virtual BOOL FPlayerCanTakeDamage( CBasePlayer *pPlayer, CBaseEntity *pAttacker );
|
||||
|
||||
// TODO: Add splash damage parameter and outgoing float percentage damage? This way splash damage could do some damage in non-tourny mode?
|
||||
virtual bool CanEntityDoDamageTo(const CBaseEntity* inAttacker, const CBaseEntity* inReceiver, float* outScalar = NULL);
|
||||
virtual bool CanEntityDoDamageTo(const CBaseEntity* inAttacker, const CBaseEntity* inReceiver, float* outScalar = NULL, bool triggerHiveDefend = true);
|
||||
|
||||
//virtual edict_t* GetPlayerSpawnSpot( CBasePlayer *pPlayer );
|
||||
virtual void PlayerThink( CBasePlayer *pPlayer );
|
||||
|
|
|
@ -150,7 +150,7 @@ void AvHParasiteGun::FireProjectiles(void)
|
|||
{
|
||||
float theScalar = 1.0f;
|
||||
|
||||
bool theCanDoDamageTo = GetGameRules()->CanEntityDoDamageTo(this->m_pPlayer, theEntityHit, &theScalar);
|
||||
bool theCanDoDamageTo = GetGameRules()->CanEntityDoDamageTo(this->m_pPlayer, theEntityHit, &theScalar, false);
|
||||
|
||||
theScalar *= AvHPlayerUpgrade::GetAlienRangedDamageUpgrade(this->m_pPlayer->pev->iuser4);
|
||||
|
||||
|
|
Loading…
Reference in a new issue