mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- Added player MugShotMaxHealth property. Negative values use the player's
max health as the mug shot max health, zero uses 100 as the mug shot max health, and positive values used directly as the mug shot max health. SVN r1757 (trunk)
This commit is contained in:
parent
f9088bd2cf
commit
63e26df7b2
5 changed files with 25 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
|||
August 6, 2009
|
||||
- Added player MugShotMaxHealth property. Negative values use the player's
|
||||
max health as the mug shot max health, zero uses 100 as the mug shot max
|
||||
health, and positive values used directly as the mug shot max health.
|
||||
- Added buddha cheat.
|
||||
- Added TELEFRAG_DAMAGE constant, and changed the two places that still used
|
||||
1000 as the threshold for god mode damage to use it instead. (Players with
|
||||
|
|
|
@ -117,6 +117,7 @@ public:
|
|||
|
||||
int crouchsprite;
|
||||
int MaxHealth;
|
||||
int MugShotMaxHealth;
|
||||
int RunHealth;
|
||||
int PlayerFlags;
|
||||
TObjPtr<AInventory> InvFirst; // first inventory item displayed on inventory bar
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "d_event.h"
|
||||
#include "sbar.h"
|
||||
#include "sbarinfo.h"
|
||||
#include "templates.h"
|
||||
|
||||
#define ST_RAMPAGEDELAY (2*TICRATE)
|
||||
#define ST_MUCHPAIN 20
|
||||
|
@ -476,7 +477,16 @@ FTexture *FMugShot::GetFace(player_t *player, const char *default_face, int accu
|
|||
{
|
||||
int angle = UpdateState(player, stateflags);
|
||||
int level = 0;
|
||||
while (player->health < (accuracy-1-level) * (player->mo->GetMaxHealth()/accuracy))
|
||||
int max = player->mo->MugShotMaxHealth;
|
||||
if (max < 0)
|
||||
{
|
||||
max = player->mo->GetMaxHealth();
|
||||
}
|
||||
else if (max == 0)
|
||||
{
|
||||
max = 100;
|
||||
}
|
||||
while (player->health < (accuracy - 1 - level) * (max / accuracy))
|
||||
{
|
||||
level++;
|
||||
}
|
||||
|
|
|
@ -1860,6 +1860,15 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, maxhealth, I, PlayerPawn)
|
|||
defaults->MaxHealth = z;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, mugshotmaxhealth, I, PlayerPawn)
|
||||
{
|
||||
PROP_INT_PARM(z, 0);
|
||||
defaults->MugShotMaxHealth = z;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
@ -27,6 +27,7 @@ Actor PlayerPawn : Actor native
|
|||
Player.ColorRange 0,0
|
||||
Player.SoundClass "player"
|
||||
Player.DamageScreenColor "ff 00 00"
|
||||
Player.MugShotMaxHealth 0
|
||||
}
|
||||
|
||||
Actor PlayerChunk : PlayerPawn native
|
||||
|
|
Loading…
Reference in a new issue