Make WRot readonly and use in parameter modifier

This commit is contained in:
teinarss
2020-12-01 20:41:03 +01:00
committed by Paul Chote
parent 942f1e2d9e
commit e6db2c98d0
6 changed files with 17 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits
return new WVec(vec.Y, -CameraPitch.Sin() * vec.X / 1024, vec.Z);
}
public WRot QuantizeOrientation(WRot orientation, int facings)
public WRot QuantizeOrientation(in WRot orientation, int facings)
{
// Quantization disabled
if (facings == 0)
@@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
return info.LocalToWorld(vec);
}
public WRot QuantizeOrientation(Actor self, WRot orientation)
public WRot QuantizeOrientation(Actor self, in WRot orientation)
{
return info.QuantizeOrientation(orientation, quantizedFacings.Value);
}