#include "gAICharacter.h"
#include "tDirectories.h"
#include "tConfiguration.h"
#include "tRecorder.h"
#include <fstream>
#include <sstream>
Go to the source code of this file.
Functions | |
static bool | LoadSingleAI (tString const &line) |
Variables | |
tString | aiPlayersConfig ("aiplayers.cfg") |
static tSettingItem< tString > | aifile ("AI_CHARACTER_FILE", aiPlayersConfig) |
static REAL | weight [AI_PROPERTIES] |
static bool LoadSingleAI | ( | tString const & | line | ) | [static] |
Definition at line 81 of file gAICharacter.cpp.
References c, GrowingArrayBase::Len(), gAICharacter::Load(), gAICharacter::s_Characters, and tArray< T, MALLOC >::SetLen().
Referenced by gAICharacter::LoadAll().
00082 { 00083 // build stream from 00084 std::stringstream str(static_cast< char const * >( line ) ); 00085 00086 // gets new character and lets it load the stream 00087 int i = gAICharacter::s_Characters.Len(); 00088 gAICharacter& c = gAICharacter::s_Characters[i]; 00089 bool ret = c.Load(str); 00090 00091 // remove character on failure 00092 if ( !ret ) 00093 gAICharacter::s_Characters.SetLen(i); 00094 00095 return ret; 00096 }
tSettingItem<tString> aifile("AI_CHARACTER_FILE", aiPlayersConfig) [static] |
tString aiPlayersConfig("aiplayers.cfg") |
Referenced by main().
Initial value:
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0 }
Definition at line 40 of file gAICharacter.cpp.
Referenced by gAICharacter::Load(), nServerLag::Report(), and se_receiveLagMessage().