Remove facing check from WithVoxelWalkerBody

`Mobile` now supports considering turning as `IsMoving`, so this check is no longer needed.
This commit is contained in:
reaperrr
2018-07-05 11:46:04 +02:00
committed by reaperrr
parent 2d47f61409
commit 496155ff0e

View File

@@ -51,18 +51,15 @@ namespace OpenRA.Mods.Cnc.Traits.Render
{
readonly WithVoxelWalkerBodyInfo info;
readonly IMove movement;
readonly IFacing facing;
readonly ModelAnimation modelAnimation;
readonly RenderVoxels rv;
int oldFacing;
uint tick, frame, frames;
public WithVoxelWalkerBody(Actor self, WithVoxelWalkerBodyInfo info)
{
this.info = info;
movement = self.Trait<IMove>();
facing = self.Trait<IFacing>();
var body = self.Trait<BodyOrientation>();
rv = self.Trait<RenderVoxels>();
@@ -78,9 +75,8 @@ namespace OpenRA.Mods.Cnc.Traits.Render
void ITick.Tick(Actor self)
{
if (movement.IsMoving || facing.Facing != oldFacing)
if (movement.IsMoving)
tick++;
oldFacing = facing.Facing;
if (tick < info.TickRate)
return;