mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-10 07:11:48 +00:00
o Defence chambers now heal the base 10 + a variable 4%
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@415 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
df66303212
commit
3be39e1003
2 changed files with 5 additions and 2 deletions
|
@ -84,6 +84,7 @@
|
|||
#define kDefenseChamberThinkInterval 2
|
||||
#define kDefensiveChamberHealRange 400
|
||||
#define kDefensiveChamberRegenAmount 10
|
||||
#define kDefensiveChamberRegenPercent 4
|
||||
#define kDevourDamage 3
|
||||
#define kDevourRange 100
|
||||
#define kDistressBeaconCost 15
|
||||
|
|
|
@ -389,16 +389,18 @@ void AvHDefenseChamber::RegenAliensThink()
|
|||
{
|
||||
AvHBaseBuildable* theBuildable = dynamic_cast<AvHBaseBuildable*>(theBaseEntity);
|
||||
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(theBaseEntity);
|
||||
float thePercent=BALANCE_VAR(kDefensiveChamberRegenPercent)/100.0f;
|
||||
float amount=BALANCE_VAR(kDefensiveChamberRegenAmount) + (theBaseEntity->pev->max_health*thePercent);
|
||||
if(thePlayer && thePlayer->IsAlive())
|
||||
{
|
||||
if(thePlayer->Heal(BALANCE_VAR(kDefensiveChamberRegenAmount)))
|
||||
if(thePlayer->Heal(amount))
|
||||
{
|
||||
theNumEntsHealed++;
|
||||
}
|
||||
}
|
||||
else if(theBuildable && theBuildable->GetIsBuilt() && (theBuildable != this))
|
||||
{
|
||||
if(theBuildable->Regenerate(BALANCE_VAR(kDefensiveChamberRegenAmount)))
|
||||
if(theBuildable->Regenerate(amount))
|
||||
{
|
||||
theNumEntsHealed++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue