Merge branch 'maint'

This commit is contained in:
Christoph Oelckers 2013-08-28 11:20:53 +02:00
commit 9c2454eacc
3 changed files with 13 additions and 9 deletions

View file

@ -121,7 +121,11 @@ class ARandomSpawner : public AActor
AActor * newmobj = NULL;
bool boss = false;
Super::PostBeginPlay();
if (Species == NAME_None) { Destroy(); return; }
if (Species == NAME_None)
{
Destroy();
return;
}
const PClass * cls = PClass::FindClass(Species);
if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile.
{
@ -142,8 +146,9 @@ class ARandomSpawner : public AActor
newmobj->args[4] = args[4];
newmobj->special1 = special1;
newmobj->special2 = special2;
newmobj->SpawnFlags = SpawnFlags;
newmobj->SpawnFlags = SpawnFlags & ~MTF_SECRET; // MTF_SECRET needs special treatment to avoid incrementing the secret counter twice. It had already been processed for the spawner itself.
newmobj->HandleSpawnFlags();
newmobj->SpawnFlags = SpawnFlags;
newmobj->tid = tid;
newmobj->AddToHash();
newmobj->velx = velx;

View file

@ -53,11 +53,6 @@
#include "r_data/r_translate.h"
#include "g_level.h"
#define WATER_SINK_FACTOR 3
#define WATER_SINK_SMALL_FACTOR 4
#define WATER_SINK_SPEED (FRACUNIT/2)
#define WATER_JUMP_SPEED (FRACUNIT*7/2)
CVAR (Bool, cl_bloodsplats, true, CVAR_ARCHIVE)
CVAR (Int, sv_smartaim, 0, CVAR_ARCHIVE|CVAR_SERVERINFO)
CVAR (Bool, cl_doautoaim, false, CVAR_ARCHIVE)

View file

@ -3997,8 +3997,12 @@ void AActor::HandleSpawnFlags ()
}
if (SpawnFlags & MTF_SECRET)
{
//Printf("Secret %s in sector %i!\n", GetTag(), Sector->sectornum);
flags5 |= MF5_COUNTSECRET;
if (!(flags5 & MF5_COUNTSECRET))
{
//Printf("Secret %s in sector %i!\n", GetTag(), Sector->sectornum);
flags5 |= MF5_COUNTSECRET;
level.total_secrets++;
}
}
}