Small scorenum/damnum refactor.
This commit is contained in:
parent
6d8732af5d
commit
38cd7df826
23 changed files with 182 additions and 54 deletions
|
|
@ -5,6 +5,8 @@ extend Class Demolitionist
|
|||
void CheatGive_Health( int amount = 0 )
|
||||
{
|
||||
player.health = health = (amount>0)?(health+amount):default.health;
|
||||
if ( player == players[consoleplayer] && ((amount > 0) || ((health-default.health) > 0)) )
|
||||
SWWMScoreObj.SpawnAtActorBunch((amount>0)?amount:(health-default.health),self,Font.CR_BLUE);
|
||||
}
|
||||
void CheatGive_Backpack()
|
||||
{
|
||||
|
|
@ -60,6 +62,8 @@ extend Class Demolitionist
|
|||
armo.AttachToOwner(self);
|
||||
}
|
||||
armo.Amount = armo.MaxAmount;
|
||||
if ( player == players[consoleplayer] )
|
||||
SWWMScoreObj.SpawnAtActorBunch(armo.MaxAmount,self,Font.CR_GREEN);
|
||||
}
|
||||
}
|
||||
void CheatGive_Keys()
|
||||
|
|
@ -225,6 +229,7 @@ extend Class Demolitionist
|
|||
|
||||
void CheatTake_Health( int amount = 0 )
|
||||
{
|
||||
if ( amount > 0 ) SWWMDamNum.SpawnAtActor(amount,self);
|
||||
if ( amount >= health )
|
||||
{
|
||||
CheatSuicide();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue