mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- added Player.Aircapacity property which is used as a multiplier for the level's air supply.
This commit is contained in:
parent
a0c214104d
commit
34b71baad1
5 changed files with 17 additions and 2 deletions
|
@ -141,6 +141,7 @@ public:
|
|||
FNameNoInit MorphWeapon;
|
||||
fixed_t AttackZOffset; // attack height, relative to player center
|
||||
fixed_t UseRange; // [NS] Distance at which player can +use
|
||||
fixed_t AirCapacity; // Multiplier for air supply underwater.
|
||||
const PClass *FlechetteType;
|
||||
|
||||
// [CW] Fades for when you are being damaged.
|
||||
|
|
|
@ -477,6 +477,10 @@ void APlayerPawn::Serialize (FArchive &arc)
|
|||
{
|
||||
arc << UseRange;
|
||||
}
|
||||
if (SaveVersion >= 4503)
|
||||
{
|
||||
arc << AirCapacity;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1066,7 +1070,7 @@ bool APlayerPawn::ResetAirSupply (bool playgasp)
|
|||
{
|
||||
S_Sound (this, CHAN_VOICE, "*gasp", 1, ATTN_NORM);
|
||||
}
|
||||
if (level.airsupply> 0) player->air_finished = level.time + level.airsupply;
|
||||
if (level.airsupply> 0 && player->mo->AirCapacity > 0) player->air_finished = level.time + FixedMul(level.airsupply, player->mo->AirCapacity);
|
||||
else player->air_finished = INT_MAX;
|
||||
return wasdrowning;
|
||||
}
|
||||
|
|
|
@ -2419,6 +2419,15 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, userange, F, PlayerPawn)
|
|||
defaults->UseRange = z;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, aircapacity, F, PlayerPawn)
|
||||
{
|
||||
PROP_FIXED_PARM(z, 0);
|
||||
defaults->AirCapacity = z;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
@ -76,7 +76,7 @@ const char *GetVersionString();
|
|||
|
||||
// Use 4500 as the base git save version, since it's higher than the
|
||||
// SVN revision ever got.
|
||||
#define SAVEVER 4502
|
||||
#define SAVEVER 4503
|
||||
|
||||
#define SAVEVERSTRINGIFY2(x) #x
|
||||
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
||||
|
|
|
@ -32,6 +32,7 @@ Actor PlayerPawn : Actor native
|
|||
Player.DamageScreenColor "ff 00 00"
|
||||
Player.MugShotMaxHealth 0
|
||||
Player.FlechetteType "ArtiPoisonBag3"
|
||||
Player.AirCapacity 1
|
||||
Obituary "$OB_MPDEFAULT"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue