From ececec1c65ec1cab0ffed65cee34c6a44209c50d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 12 Dec 2010 21:09:16 +0000 Subject: [PATCH] - init bot specific actor properties righr after parsing DECORATE, not when spawning the first bot (which is too late.) SVN r3032 (trunk) --- src/b_bot.cpp | 5 ----- src/b_game.cpp | 3 --- src/info.cpp | 2 ++ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/b_bot.cpp b/src/b_bot.cpp index cee4086ae..eaa71c0e1 100644 --- a/src/b_bot.cpp +++ b/src/b_bot.cpp @@ -105,11 +105,6 @@ FArchive &operator<< (FArchive &arc, botskill_t &skill) // This is intentionally not in the weapon definition anymore. void InitBotStuff() { - static bool done = false; - - if (done) return; - done = true; - static struct BotInit { const char *type; diff --git a/src/b_game.cpp b/src/b_game.cpp index f517f27ee..2ff74a285 100644 --- a/src/b_game.cpp +++ b/src/b_game.cpp @@ -63,8 +63,6 @@ Everything that is changed is marked (maybe commented) with "Added by MC" static FRandom pr_botspawn ("BotSpawn"); -void InitBotStuff(); - //Externs FCajunMaster bglobal; @@ -321,7 +319,6 @@ bool FCajunMaster::SpawnBot (const char *name, int color) waitingforspawn[playernumber] = true; - InitBotStuff(); Net_WriteByte (DEM_ADDBOT); Net_WriteByte (playernumber); { diff --git a/src/info.cpp b/src/info.cpp index 1b49ce7dd..988c175df 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -52,6 +52,7 @@ #include "g_level.h" extern void LoadActors (); +extern void InitBotStuff(); //========================================================================== @@ -121,6 +122,7 @@ void FActorInfo::StaticInit () Printf ("LoadActors: Load actor definitions.\n"); LoadActors (); + InitBotStuff(); } //==========================================================================