Rename VoxelAnimation to ModelAnimation.
This commit is contained in:
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
|
||||
public override object Create(ActorInitializer init) { return new WithVoxelBarrel(init.Self, this); }
|
||||
|
||||
public IEnumerable<VoxelAnimation> RenderPreviewVoxels(
|
||||
public IEnumerable<ModelAnimation> RenderPreviewVoxels(
|
||||
ActorPreviewInitializer init, RenderVoxelsInfo rv, string image, Func<WRot> orientation, int facings, PaletteReference p)
|
||||
{
|
||||
if (!EnabledByDefault)
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
Func<WRot> quantizedBody = () => body.QuantizeOrientation(orientation(), facings);
|
||||
Func<WVec> barrelOffset = () => body.LocalToWorld((t.Offset + LocalOffset.Rotate(quantizedTurret())).Rotate(quantizedBody()));
|
||||
|
||||
yield return new VoxelAnimation(voxel, barrelOffset, () => new[] { turretOrientation(), orientation() },
|
||||
yield return new ModelAnimation(voxel, barrelOffset, () => new[] { turretOrientation(), orientation() },
|
||||
() => false, () => 0, ShowShadow);
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
buildComplete = !self.Info.HasTraitInfo<BuildingInfo>(); // always render instantly for units
|
||||
|
||||
var rv = self.Trait<RenderVoxels>();
|
||||
rv.Add(new VoxelAnimation(VoxelProvider.GetVoxel(rv.Image, Info.Sequence),
|
||||
rv.Add(new ModelAnimation(VoxelProvider.GetVoxel(rv.Image, Info.Sequence),
|
||||
BarrelOffset, BarrelRotation,
|
||||
() => IsTraitDisabled || !buildComplete, () => 0, info.ShowShadow));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user