Fix FrozenUnderFog; add to cnc.
This commit is contained in:
@@ -16,12 +16,17 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
class FrozenUnderFogInfo : TraitInfo<FrozenUnderFog> {}
|
||||
|
||||
class FrozenUnderFog : IRenderModifier
|
||||
class FrozenUnderFog : IRenderModifier, IVisibilityModifier
|
||||
{
|
||||
public bool IsVisible(Actor self)
|
||||
{
|
||||
return Shroud.GetVisOrigins(self).Any(o => self.World.LocalShroud.IsVisible(o));
|
||||
}
|
||||
|
||||
Renderable[] cache = { };
|
||||
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
||||
{
|
||||
if (self.World.LocalShroud.IsVisible(self))
|
||||
if (IsVisible(self))
|
||||
cache = r.ToArray();
|
||||
return cache;
|
||||
}
|
||||
|
||||
@@ -193,6 +193,7 @@
|
||||
Queue: Building
|
||||
RenderBuilding:
|
||||
DeadBuildingState:
|
||||
FrozenUnderFog:
|
||||
EmitInfantryOnSell:
|
||||
ActorTypes: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,e1,e1,e1,e1,e1,e1,e1
|
||||
MustBeDestroyed:
|
||||
@@ -219,6 +220,7 @@
|
||||
Type: Wood
|
||||
Building:
|
||||
-RepairableBuilding:
|
||||
-FrozenUnderFog:
|
||||
Tooltip:
|
||||
Name: Civilian Building
|
||||
|
||||
|
||||
Reference in New Issue
Block a user