- 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:
Christoph Oelckers 2017-02-28 01:23:12 +01:00
parent 78a66e001a
commit a93a7e1cac
5 changed files with 19 additions and 36 deletions

View File

@ -159,8 +159,6 @@ public:
FNameNoInit Face; // Doom status bar face (when used) FNameNoInit Face; // Doom status bar face (when used)
FNameNoInit Portrait; FNameNoInit Portrait;
FNameNoInit Slot[10]; FNameNoInit Slot[10];
FNameNoInit InvulMode;
FNameNoInit HealingRadiusType;
double HexenArmor[5]; double HexenArmor[5];
BYTE ColorRangeStart; // Skin color range BYTE ColorRangeStart; // Skin color range
BYTE ColorRangeEnd; BYTE ColorRangeEnd;

View File

@ -3325,13 +3325,10 @@ DEFINE_FIELD(APlayerPawn, FlechetteType)
DEFINE_FIELD(APlayerPawn, DamageFade) DEFINE_FIELD(APlayerPawn, DamageFade)
DEFINE_FIELD(APlayerPawn, ViewBob) DEFINE_FIELD(APlayerPawn, ViewBob)
DEFINE_FIELD(APlayerPawn, FullHeight) DEFINE_FIELD(APlayerPawn, FullHeight)
DEFINE_FIELD(APlayerPawn, HealingRadiusType)
DEFINE_FIELD(APlayerPawn, SoundClass) DEFINE_FIELD(APlayerPawn, SoundClass)
DEFINE_FIELD(APlayerPawn, Face) DEFINE_FIELD(APlayerPawn, Face)
DEFINE_FIELD(APlayerPawn, Portrait) DEFINE_FIELD(APlayerPawn, Portrait)
DEFINE_FIELD(APlayerPawn, Slot) DEFINE_FIELD(APlayerPawn, Slot)
DEFINE_FIELD(APlayerPawn, InvulMode)
DEFINE_FIELD(APlayerPawn, HexenArmor) DEFINE_FIELD(APlayerPawn, HexenArmor)
DEFINE_FIELD(APlayerPawn, ColorRangeStart) DEFINE_FIELD(APlayerPawn, ColorRangeStart)
DEFINE_FIELD(APlayerPawn, ColorRangeEnd) DEFINE_FIELD(APlayerPawn, ColorRangeEnd)

View File

@ -2699,24 +2699,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, startitem, S_i, PlayerPawn)
bag.DropItemList = di; 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;
}
//========================================================================== //==========================================================================
// //
//========================================================================== //==========================================================================

View File

@ -1188,8 +1188,10 @@ bool ZCCCompiler::CompileProperties(PClass *type, TArray<ZCC_Property *> &Proper
FString qualifiedname; FString qualifiedname;
// Store the full qualified name and prepend some 'garbage' to the name so that no conflicts with other symbol types can happen. // 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. // 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()); FName name = FName(p->NodeName);
else qualifiedname.Format("@property@%s.%s", prefix.GetChars(), FName(p->NodeName).GetChars()); if (prefix == NAME_None) qualifiedname.Format("@property@%s", name.GetChars());
else qualifiedname.Format("@property@%s.%s", prefix.GetChars(), name.GetChars());
fields.ShrinkToFit(); fields.ShrinkToFit();
if (!type->Symbols.AddSymbol(new PProperty(qualifiedname, fields))) if (!type->Symbols.AddSymbol(new PProperty(qualifiedname, fields)))
{ {

View File

@ -8,18 +8,14 @@ class PlayerPawn : Actor native
native int PlayerFlags; native int PlayerFlags;
native Inventory InvFirst; // first inventory item displayed on inventory bar native Inventory InvFirst; // first inventory item displayed on inventory bar
native Inventory InvSel; // selected inventory item native Inventory InvSel; // selected inventory item
native meta String DisplayName; // Display name (used in menus, etc.) 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;
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;
// [GRB] Player class properties // [GRB] Player class properties
native double JumpZ; native double JumpZ;
native double GruntSpeed; native double GruntSpeed;
@ -37,6 +33,14 @@ class PlayerPawn : Actor native
native color DamageFade; // [CW] Fades for when you are being damaged. native color DamageFade; // [CW] Fades for when you are being damaged.
native double ViewBob; // [SP] ViewBob Multiplier native double ViewBob; // [SP] ViewBob Multiplier
native double FullHeight; 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 Default
{ {