private function initFlag(teamType:BattleTeamType, flagSpec:ClientFlag, flagData:FlagData):void
        {
            var texture:BitmapData;
            var flag:CTFFlag;
            var pedestal:Object3D;
            var carrierData:TankData;
            var imageResource:BitmapData = ResourceUtil.getResource(ResourceType.IMAGE, flagData.imageResourceId).bitmapData;
            if (imageResource != null)
            {
                texture = imageResource;
            }
            else
            {
                texture = new BitmapData(this.FLAG_FRAME_WIDTH, this.FLAG_FRAME_HEIGHT, false, ((teamType == BattleTeamType.RED) ? 0xAA0000 : 170));
            };
            var materialSequence:MaterialSequence = materialRegistry.materialSequenceRegistry.getSequence(MaterialType.EFFECT, texture, this.FLAG_FRAME_WIDTH, FLAG_MIPMAP_RESOLUTION);
            var position:Vector3 = flagSpec.flagBasePosition;
            flag = new CTFFlag(teamType, position, this.FLAG_FRAME_WIDTH, this.FLAG_FRAME_HEIGHT, materialSequence.materials, texture, this.bfData.collisionDetector);
            this.flags[teamType] = flag;
            flag.addToContainer(this.bfData.viewport.getMapContainer());
            if (flagSpec.flagCarrierId != null)
            {
                carrierData = this.getTankData(flagSpec.flagCarrierId, this.bfData.bfObject.register);
                flag.setCarrier(flagSpec.flagCarrierId, carrierData);
                this.guiModel.ctfShowFlagCarried(teamType);
            }
            else
            {
                if (flagSpec.flagPosition != null)
                {
                    position.x = flagSpec.flagPosition.x;
                    position.y = flagSpec.flagPosition.y;
                    position.z = flagSpec.flagPosition.z;
                    if ((!(flag.isAtBase())))
                    {
                        flag.dropAt(position, this.bfData.collisionDetector);
                    }
                    else
                    {
                        flag.returnToBase();
                    };
                    this.guiModel.ctfShowFlagDropped(teamType);
                };
            };
			var lightpedestal:uint;
            pedestal = this.createPedestal(flagData.pedestalModelId, flagData.pedestalModel_img, lightpedestal);
            var pos:Vector3 = flag.basePosition.vClone();
            pos.z = (pos.z - (CTFFlag.Z_DISPLACEMENT - 1));
            pedestal.x = pos.x;
            pedestal.y = pos.y;
            pedestal.z = pos.z;
			this.light.x = pedestal.x;
            this.light.y = pedestal.y;
            this.light.z = (pedestal.z - 250);
            this.bfData.viewport.getMapContainer().addChild(pedestal);
			this.bfData.viewport.getMapContainer().addChild(this.light);
        }

        private function createPedestal(resourceId:String, resourceImageId:String, lightpedestal:uint):Object3D
        {
            var object:Mesh = ResourceUtil.getResource(ResourceType.MODEL, resourceId).mesh;
            var pedestal:BSP = new BSP();
			object.shadowMapAlphaThreshold = 0.1;
            object.calculateVerticesNormalsBySmoothingGroups(0.01);
            pedestal.createTree(object);
            var texture:BitmapData = ResourceUtil.getResource(ResourceType.IMAGE, resourceImageId).bitmapData;
            if (texture == null)
            {
                texture = new StubBitmapData(0xFFFF00);
            };
            var resolution:Number = pedestal.calculateResolution(texture.width, texture.height);
            var material:TextureMaterial = materialRegistry.textureMaterialRegistry.getMaterial(MaterialType.EFFECT, texture, resolution, false);
            pedestal.setMaterialToAllFaces(material);
			this.light = new OmniLight(lightpedestal, 250, 600);
            return (pedestal);
        }  почему освещение не работает на pedestal