mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +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 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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -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)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,17 +8,13 @@ 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 /*meta*/ Name SoundClass; // Sound class
|
native Name Portrait;
|
||||||
native /*meta*/ Name Face; // Doom status bar face (when used)
|
native Name Slot[10];
|
||||||
native /*meta*/ Name Portrait;
|
native double HexenArmor[5];
|
||||||
native /*meta*/ Name Slot[10];
|
native uint8 ColorRangeStart; // Skin color range
|
||||||
native /*meta*/ Name InvulMode;
|
native uint8 ColorRangeEnd;
|
||||||
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;
|
||||||
|
@ -38,6 +34,14 @@ class PlayerPawn : Actor native
|
||||||
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
|
||||||
{
|
{
|
||||||
Health 100;
|
Health 100;
|
||||||
|
|
Loading…
Reference in a new issue