- the missing parts of last commit.

This commit is contained in:
Christoph Oelckers 2019-01-09 19:02:02 +01:00
parent 4227b9020c
commit 00b49282be
5 changed files with 7 additions and 6 deletions

View file

@ -130,7 +130,7 @@ FCajunMaster::~FCajunMaster()
}
//This function is called every tick (from g_game.c).
void FCajunMaster::Main ()
void FCajunMaster::Main(FLevelLocals *Level)
{
BotThinkCycles.Reset();
@ -138,7 +138,7 @@ void FCajunMaster::Main ()
return;
//Add new bots?
if (wanted_botnum > botnum && !freeze)
if (wanted_botnum > botnum && !Level->freeze)
{
if (t_join == ((wanted_botnum - botnum) * SPAWN_DELAY))
{
@ -177,7 +177,6 @@ void FCajunMaster::Init ()
botnum = 0;
firstthing = nullptr;
spawn_tries = 0;
freeze = false;
observer = false;
body1 = nullptr;
body2 = nullptr;

View file

@ -1103,7 +1103,7 @@ void G_Ticker ()
uint32_t rngsum = FRandom::StaticSumSeeds ();
//Added by MC: For some of that bot stuff. The main bot function.
bglobal.Main ();
bglobal.Main (&level);
for (i = 0; i < MAXPLAYERS; i++)
{

View file

@ -1477,6 +1477,8 @@ void FLevelLocals::InitLevelLocals ()
flags = 0;
flags2 = 0;
flags3 = 0;
freeze = false;
changefreeze = false;
info = FindLevelInfo (MapName);

View file

@ -1198,7 +1198,7 @@ void GLSprite::ProcessParticle (HWDrawInfo *di, particle_t *particle, sector_t *
const auto &vp = di->Viewpoint;
double timefrac = vp.TicFrac;
if (paused || Level->freeze || (di->Level->flags2 & LEVEL2_FROZEN))
if (paused || di->Level->freeze || (di->Level->flags2 & LEVEL2_FROZEN))
timefrac = 0.;
float xvf = (particle->Vel.X) * timefrac;
float yvf = (particle->Vel.Y) * timefrac;

View file

@ -986,7 +986,7 @@ void G_SerializeLevel(FSerializer &arc, FLevelLocals *Level, bool hubload)
("acsthinker", Level->ACSThinker)
("impactdecalcount", Level->ImpactDecalCount)
("freeze", Level->freeze)
("changefreeze", Level->changefreeze
("changefreeze", Level->changefreeze);
// Hub transitions must keep the current total time
if (!hubload)