make fog of war rendering optional for classic mods
This commit is contained in:
@@ -129,8 +129,9 @@ namespace OpenRA.Graphics
|
||||
}
|
||||
|
||||
var clipRect = Game.viewport.WorldBounds(wr.world);
|
||||
DrawShroud(wr, clipRect, fogSprites, fogPalette);
|
||||
DrawShroud(wr, clipRect, sprites, shroudPalette);
|
||||
if (wr.world.WorldActor.HasTrait<Fog>())
|
||||
DrawShroud(wr, clipRect, fogSprites, fogPalette);
|
||||
}
|
||||
|
||||
void DrawShroud(WorldRenderer wr, Rectangle clip, Sprite[,] s, PaletteReference pal)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -178,6 +178,7 @@
|
||||
<Compile Include="Traits\ValidateOrder.cs" />
|
||||
<Compile Include="Traits\Waypoint.cs" />
|
||||
<Compile Include="Traits\World\Country.cs" />
|
||||
<Compile Include="Traits\World\Fog.cs" />
|
||||
<Compile Include="Traits\World\PlayerColorPalette.cs" />
|
||||
<Compile Include="Traits\World\ResourceLayer.cs" />
|
||||
<Compile Include="Traits\World\ResourceType.cs" />
|
||||
@@ -194,7 +195,7 @@
|
||||
<Compile Include="Widgets\DropDownButtonWidget.cs" />
|
||||
<Compile Include="Widgets\GridLayout.cs" />
|
||||
<Compile Include="Widgets\ImageWidget.cs" />
|
||||
<Compile Include="Widgets\LabelWidget.cs" />
|
||||
<Compile Include="Widgets\LabelWidget.cs" />
|
||||
<Compile Include="Widgets\LineGraphWidget.cs" />
|
||||
<Compile Include="Widgets\ListLayout.cs" />
|
||||
<Compile Include="Widgets\MapPreviewWidget.cs" />
|
||||
|
||||
22
OpenRA.Game/Traits/World/Fog.cs
Normal file
22
OpenRA.Game/Traits/World/Fog.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
public class FogInfo : TraitInfo<Fog>
|
||||
{
|
||||
/*
|
||||
* This tag trait will enable fog of war in ShroudRenderer.
|
||||
* Don't forget about HiddenUnderFog and FrozenUnderFog.
|
||||
*/
|
||||
}
|
||||
|
||||
public class Fog { }
|
||||
}
|
||||
@@ -158,6 +158,7 @@ World:
|
||||
SpatialBins:
|
||||
BinSize: 4
|
||||
Shroud:
|
||||
Fog:
|
||||
CrateSpawner:
|
||||
Minimum: 1
|
||||
Maximum: 6
|
||||
|
||||
@@ -353,6 +353,7 @@ World:
|
||||
SpatialBins:
|
||||
BinSize: 4
|
||||
Shroud:
|
||||
Fog:
|
||||
PathFinder:
|
||||
ValidateOrder:
|
||||
|
||||
|
||||
@@ -306,6 +306,7 @@ World:
|
||||
SpatialBins:
|
||||
BinSize: 4
|
||||
Shroud:
|
||||
Fog:
|
||||
PathFinder:
|
||||
ValidateOrder:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user