Exemplo n.º 1
0
        public void ResolveResources(ResourceManager M59ResourceManager, bool RaiseChangedEvent)
        {
            // try find the roofile instance
            RooFile rooFile = M59ResourceManager.GetRoom(roomFile);

            // if found resolve room resources and uncompress all
            if (rooFile != null && !rooFile.IsResourcesResolved)
            {
                rooFile.ResolveResources(M59ResourceManager);
                rooFile.UncompressAll();
            }

            // try find the wading sound file and load it
            string sound = M59ResourceManager.GetWavFile(wadingSoundFile);

            if (RaiseChangedEvent)
            {
                ResourceRoom        = rooFile;
                ResourceWadingSound = sound;
            }
            else
            {
                resourceRoom        = rooFile;
                resourceWadingSound = sound;
            }
        }
Exemplo n.º 2
0
        protected virtual void HandlePlayerMessage(PlayerMessage Message)
        {
            double tick = GameTick.GetUpdatedTick();

            RoomInfo roomInfo = Message.RoomInfo;

            if (roomInfo.RoomFile != String.Empty)
            {
                // try find the roofile instance
                RooFile rooFile = resourceManager.GetRoom(roomInfo.RoomFile);
                roomInfo.ResourceRoom = rooFile;

                // found and never "loaded" before, resolve and uncompress
                // otherwise don't touch it in this thread
                if (rooFile != null && !rooFile.IsResourcesResolved)
                {
                    rooFile.ResolveResources(resourceManager);
                    rooFile.UncompressAll();
                }
            }

            double span = GameTick.GetUpdatedTick() - tick;

            Logger.Log(MODULENAME, LogType.Info, "Loaded BP_PLAYER: " + span.ToString() + " ms");
        }