mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- handle player meta properties.
Only two really make sense, the rest is never used from scripts and may just remain where it was.
This commit is contained in:
parent
78a66e001a
commit
a93a7e1cac
5 changed files with 19 additions and 36 deletions
|
@ -159,8 +159,6 @@ public:
|
|||
FNameNoInit Face; // Doom status bar face (when used)
|
||||
FNameNoInit Portrait;
|
||||
FNameNoInit Slot[10];
|
||||
FNameNoInit InvulMode;
|
||||
FNameNoInit HealingRadiusType;
|
||||
double HexenArmor[5];
|
||||
BYTE ColorRangeStart; // Skin color range
|
||||
BYTE ColorRangeEnd;
|
||||
|
|
|
@ -3325,13 +3325,10 @@ DEFINE_FIELD(APlayerPawn, FlechetteType)
|
|||
DEFINE_FIELD(APlayerPawn, DamageFade)
|
||||
DEFINE_FIELD(APlayerPawn, ViewBob)
|
||||
DEFINE_FIELD(APlayerPawn, FullHeight)
|
||||
|
||||
DEFINE_FIELD(APlayerPawn, HealingRadiusType)
|
||||
DEFINE_FIELD(APlayerPawn, SoundClass)
|
||||
DEFINE_FIELD(APlayerPawn, Face)
|
||||
DEFINE_FIELD(APlayerPawn, Portrait)
|
||||
DEFINE_FIELD(APlayerPawn, Slot)
|
||||
DEFINE_FIELD(APlayerPawn, InvulMode)
|
||||
DEFINE_FIELD(APlayerPawn, HexenArmor)
|
||||
DEFINE_FIELD(APlayerPawn, ColorRangeStart)
|
||||
DEFINE_FIELD(APlayerPawn, ColorRangeEnd)
|
||||
|
|
|
@ -2699,24 +2699,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, startitem, S_i, PlayerPawn)
|
|||
bag.DropItemList = di;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, invulnerabilitymode, S, PlayerPawn)
|
||||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->InvulMode = str;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, healradiustype, S, PlayerPawn)
|
||||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->HealingRadiusType = str;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
@ -1188,8 +1188,10 @@ bool ZCCCompiler::CompileProperties(PClass *type, TArray<ZCC_Property *> &Proper
|
|||
FString qualifiedname;
|
||||
// Store the full qualified name and prepend some 'garbage' to the name so that no conflicts with other symbol types can happen.
|
||||
// All these will be removed from the symbol table after the compiler finishes to free up the allocated space.
|
||||
if (prefix == NAME_None) qualifiedname.Format("@property@%s", FName(p->NodeName).GetChars());
|
||||
else qualifiedname.Format("@property@%s.%s", prefix.GetChars(), FName(p->NodeName).GetChars());
|
||||
FName name = FName(p->NodeName);
|
||||
if (prefix == NAME_None) qualifiedname.Format("@property@%s", name.GetChars());
|
||||
else qualifiedname.Format("@property@%s.%s", prefix.GetChars(), name.GetChars());
|
||||
|
||||
fields.ShrinkToFit();
|
||||
if (!type->Symbols.AddSymbol(new PProperty(qualifiedname, fields)))
|
||||
{
|
||||
|
|
|
@ -8,17 +8,13 @@ class PlayerPawn : Actor native
|
|||
native int PlayerFlags;
|
||||
native Inventory InvFirst; // first inventory item displayed on inventory bar
|
||||
native Inventory InvSel; // selected inventory item
|
||||
native meta String DisplayName; // Display name (used in menus, etc.)
|
||||
|
||||
native /*meta*/ Name SoundClass; // Sound class
|
||||
native /*meta*/ Name Face; // Doom status bar face (when used)
|
||||
native /*meta*/ Name Portrait;
|
||||
native /*meta*/ Name Slot[10];
|
||||
native /*meta*/ Name InvulMode;
|
||||
native /*meta*/ Name HealingRadiusType;
|
||||
native /*meta*/ double HexenArmor[5];
|
||||
native /*meta*/ uint8 ColorRangeStart; // Skin color range
|
||||
native /*meta*/ uint8 ColorRangeEnd;
|
||||
native Name SoundClass; // Sound class
|
||||
native Name Face; // Doom status bar face (when used)
|
||||
native Name Portrait;
|
||||
native Name Slot[10];
|
||||
native double HexenArmor[5];
|
||||
native uint8 ColorRangeStart; // Skin color range
|
||||
native uint8 ColorRangeEnd;
|
||||
|
||||
// [GRB] Player class properties
|
||||
native double JumpZ;
|
||||
|
@ -38,6 +34,14 @@ class PlayerPawn : Actor native
|
|||
native double ViewBob; // [SP] ViewBob Multiplier
|
||||
native double FullHeight;
|
||||
|
||||
native meta String DisplayName; // Display name (used in menus, etc.)
|
||||
meta Name HealingRadiusType;
|
||||
meta Name InvulMode;
|
||||
|
||||
Property prefix: Player;
|
||||
Property HealRadiusType: HealingradiusType;
|
||||
Property InvulnerabilityMode: InvulMode;
|
||||
|
||||
Default
|
||||
{
|
||||
Health 100;
|
||||
|
|
Loading…
Reference in a new issue