- Merged the GC branch back into the trunk, so now it can receive more

testing from the people who download SVN trunk builds.

SVN r795 (trunk)
This commit is contained in:
Randy Heit 2008-03-12 02:56:11 +00:00
commit f2660dc336
88 changed files with 2541 additions and 1523 deletions

View file

@ -167,7 +167,7 @@ IMPLEMENT_POINTY_CLASS (AActor)
DECLARE_POINTER (lastenemy)
DECLARE_POINTER (tracer)
DECLARE_POINTER (goal)
DECLARE_POINTER (LastLook) // This is actually a union
DECLARE_POINTER (LastLookActor)
DECLARE_POINTER (Inventory)
DECLARE_POINTER (LastHeard)
DECLARE_POINTER (master)
@ -236,11 +236,13 @@ void AActor::Serialize (FArchive &arc)
arc << TIDtoHate;
if (TIDtoHate == 0)
{
arc << LastLook.PlayerNumber;
arc << LastLookPlayerNumber;
LastLookActor = NULL;
}
else
{
arc << LastLook.Actor;
arc << LastLookActor;
LastLookPlayerNumber = -1;
}
arc << effects
<< alpha
@ -563,7 +565,8 @@ bool AActor::SetState (FState *newstate)
newstate->GetAction() (this);
// Check whether the called action function resulted in destroying the actor
if (ObjectFlags & OF_MassDestruction) return false;
if (ObjectFlags & OF_EuthanizeMe)
return false;
}
newstate = newstate->GetNextState();
} while (tics == 0);
@ -708,7 +711,7 @@ void AActor::DestroyAllInventory ()
//
//============================================================================
AInventory *AActor::FirstInv () const
AInventory *AActor::FirstInv ()
{
if (Inventory == NULL)
{
@ -797,7 +800,7 @@ AInventory *AActor::DropInventory (AInventory *item)
//
//============================================================================
AInventory *AActor::FindInventory (const PClass *type) const
AInventory *AActor::FindInventory (const PClass *type)
{
AInventory *item;
@ -814,7 +817,7 @@ AInventory *AActor::FindInventory (const PClass *type) const
return item;
}
AInventory *AActor::FindInventory (FName type) const
AInventory *AActor::FindInventory (FName type)
{
return FindInventory(PClass::FindClass(type));
}
@ -874,11 +877,12 @@ bool AActor::GiveAmmo (const PClass *type, int amount)
//
//============================================================================
void AActor::CopyFriendliness (const AActor *other, bool changeTarget)
void AActor::CopyFriendliness (AActor *other, bool changeTarget)
{
level.total_monsters -= CountsAsKill();
TIDtoHate = other->TIDtoHate;
LastLook = other->LastLook;
LastLookActor = other->LastLookActor;
LastLookPlayerNumber = other->LastLookPlayerNumber;
flags = (flags & ~MF_FRIENDLY) | (other->flags & MF_FRIENDLY);
flags3 = (flags3 & ~(MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)) | (other->flags3 & (MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS));
flags4 = (flags4 & ~MF4_NOHATEPLAYERS) | (other->flags4 & MF4_NOHATEPLAYERS);
@ -1052,7 +1056,7 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death);
mo->SetState (nextstate);
if (mo->ObjectFlags & OF_MassDestruction)
if (mo->ObjectFlags & OF_EuthanizeMe)
{
return;
}
@ -2865,7 +2869,7 @@ void AActor::Tick ()
// Handle X and Y momemtums
BlockingMobj = NULL;
P_XYMovement (this, cummx, cummy);
if (ObjectFlags & OF_MassDestruction)
if (ObjectFlags & OF_EuthanizeMe)
{ // actor was destroyed
return;
}
@ -2923,7 +2927,7 @@ void AActor::Tick ()
P_ZMovement (this);
}
if (ObjectFlags & OF_MassDestruction)
if (ObjectFlags & OF_EuthanizeMe)
return; // actor was destroyed
}
else if (z <= floorz)
@ -3163,7 +3167,7 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
if (actor->flags3 & MF3_ISMONSTER)
{
actor->LastLook.PlayerNumber = rng() % MAXPLAYERS;
actor->LastLookPlayerNumber = rng() % MAXPLAYERS;
actor->TIDtoHate = 0;
}
@ -3251,7 +3255,7 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
if (!SpawningMapThing)
{
actor->BeginPlay ();
if (actor->ObjectFlags & OF_MassDestruction)
if (actor->ObjectFlags & OF_EuthanizeMe)
{
return NULL;
}
@ -3990,7 +3994,7 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
mobj->angle = (DWORD)((mthing->angle * UCONST64(0x100000000)) / 360);
mobj->BeginPlay ();
if (mobj->ObjectFlags & OF_MassDestruction)
if (mobj->ObjectFlags & OF_EuthanizeMe)
{
return;
}