Пример #1
0
        public bool LevelInit(string mapName, string mapEntites, string oldLevel, string landmarkName, bool loadGame, bool background)
        {
            bool bOldLevel = !String.IsNullOrEmpty(oldLevel);

            if (loadGame)
            {
                if (!_VEngineServer.LoadGameState(mapName, true))
                {
                    if (!bOldLevel)
                    {
                        _EntityManager.ParseAllEntities(mapEntites);
                    }
                    else
                    {
                        return(false); // Regular save load case
                    }
                }

                if (!bOldLevel)
                {
                    _VEngineServer.LoadAdjacentEnts(oldLevel, landmarkName);
                }
            }
            else
            {
                _EntityManager.ResetAllEntities();
                _EntityManager.ParseAllEntities(mapEntites);
            }

            _EntityManager.PrecachePointTemplates();
            _EntityManager.CleanupDeleteList();

            return(true);
        }