- Next round of things from Gez's experimental build:
* MBF's dog (definition only, no sprites yet.) * User variables. There's an array of 10. They can be set and checked in both DECORATE and ACS. * Made the tag name changeable but eliminated the redundancy of having both the meta property and the individual actor's one. Having one is fully sufficient. TO BE FIXED: Names are case insensitive but this should better be case sensitive. Unfortunately there's currently nothing better than FName to store a string inside an actor without severely complicating matters. Also bumped savegame version to avoid problems with this change. SVN r1823 (trunk)
This commit is contained in:
parent
ea8c94d637
commit
a59de25107
20 changed files with 213 additions and 66 deletions
|
|
@ -280,36 +280,9 @@ void AActor::Serialize (FArchive &arc)
|
|||
<< MeleeState
|
||||
<< MissileState
|
||||
<< MaxDropOffHeight
|
||||
<< MaxStepHeight;
|
||||
if (SaveVersion < 1796)
|
||||
{
|
||||
int BounceFlags, bounceflags;
|
||||
arc << BounceFlags;
|
||||
|
||||
bounceflags = 0;
|
||||
if (BounceFlags & 4)
|
||||
bounceflags |= BOUNCE_UseSeeSound;
|
||||
BounceFlags &= 3;
|
||||
if (BounceFlags == 1) bounceflags |= BOUNCE_Doom;
|
||||
else if (BounceFlags == 2) bounceflags |= BOUNCE_Heretic;
|
||||
else if (BounceFlags == 3) bounceflags |= BOUNCE_Hexen;
|
||||
if (flags3 & 0x00800000)
|
||||
flags3 &= ~0x00800000, bounceflags |= BOUNCE_CanBounceWater;
|
||||
if (flags3 & 0x01000000)
|
||||
flags3 &= ~0x01000000, bounceflags |= BOUNCE_NoWallSound;
|
||||
if (flags4 & 0x80000000)
|
||||
flags4 &= ~0x80000000, bounceflags |= BOUNCE_Quiet;
|
||||
if (flags5 & 0x00000008)
|
||||
flags5 &= ~0x00000008, bounceflags |= BOUNCE_AllActors;
|
||||
if (flags5 & 0x00000010)
|
||||
flags5 &= ~0x00000010, bounceflags |= BOUNCE_ExplodeOnWater;
|
||||
BounceFlags = bounceflags;
|
||||
}
|
||||
else
|
||||
{
|
||||
arc << BounceFlags;
|
||||
}
|
||||
arc << bouncefactor
|
||||
<< MaxStepHeight
|
||||
<< BounceFlags
|
||||
<< bouncefactor
|
||||
<< wallbouncefactor
|
||||
<< bouncecount
|
||||
<< maxtargetrange
|
||||
|
|
@ -323,11 +296,12 @@ void AActor::Serialize (FArchive &arc)
|
|||
<< BlockingMobj
|
||||
<< BlockingLine
|
||||
<< pushfactor
|
||||
<< Species;
|
||||
<< Species
|
||||
<< Score
|
||||
<< Tag;
|
||||
|
||||
for(int i=0; i<10; i++) arc << uservar[i];
|
||||
|
||||
if (SaveVersion >= 1819)
|
||||
arc << Score;
|
||||
|
||||
if (arc.IsStoring ())
|
||||
{
|
||||
int convnum = 0;
|
||||
|
|
@ -5446,6 +5420,14 @@ bool AActor::IsSentient() const
|
|||
}
|
||||
|
||||
|
||||
const char *AActor::GetTag(const char *def) const
|
||||
{
|
||||
if (Tag != NAME_None) return Tag.GetChars();
|
||||
else if (def) return def;
|
||||
else return GetClass()->TypeName.GetChars();
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// DropItem handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue