mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-06-04 19:10:59 +00:00
- added property definitions to the ZScript parser. This will allow defining custom properties for the default block in custom base classes. See 'Health' for an example.
- support transient object member variables for information that does not need to be put in a savegame. - fixed: special initialization of objects needs to pass the proper defaults along, otherwise the parent classes will use their own, inappropriate one.
This commit is contained in:
parent
0c3aab794f
commit
179b6e1a39
21 changed files with 313 additions and 109 deletions
|
@ -1341,7 +1341,7 @@ bool P_GiveBody(AActor *actor, int num, int max)
|
|||
if (player != NULL)
|
||||
{
|
||||
// Max is 0 by default, preserving default behavior for P_GiveBody()
|
||||
// calls while supporting AHealth.
|
||||
// calls while supporting health pickups.
|
||||
if (max <= 0)
|
||||
{
|
||||
max = static_cast<APlayerPawn*>(actor)->GetMaxHealth() + player->mo->stamina;
|
||||
|
@ -1396,7 +1396,7 @@ bool P_GiveBody(AActor *actor, int num, int max)
|
|||
else
|
||||
{
|
||||
// Parameter value for max is ignored on monsters, preserving original
|
||||
// behaviour on AHealth as well as on existing calls to P_GiveBody().
|
||||
// behaviour of health as well as on existing calls to P_GiveBody().
|
||||
max = actor->SpawnHealth();
|
||||
if (num < 0)
|
||||
{
|
||||
|
@ -5663,9 +5663,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
// [RH] Other things that shouldn't be spawned depending on dmflags
|
||||
if (deathmatch || alwaysapplydmflags)
|
||||
{
|
||||
// Fixme: This needs to be done differently, it's quite broken.
|
||||
if (dmflags & DF_NO_HEALTH)
|
||||
{
|
||||
if (i->IsDescendantOf (RUNTIME_CLASS(AHealth)))
|
||||
if (i->IsDescendantOf (PClass::FindActor(NAME_Health)))
|
||||
return NULL;
|
||||
if (i->TypeName == NAME_Berserk)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue