removed ScreenSpaceTurretOffset bs. if you want a screenspace offset, it's the 3rd and 4th elements of the PrimaryOffset / SecondaryOffset
This commit is contained in:
@@ -50,7 +50,6 @@ namespace OpenRa.Game.GameRules
|
||||
public readonly int[] PrimaryOffset = { 0, 0 };
|
||||
public readonly int[] SecondaryOffset = null;
|
||||
public readonly int Recoil = 0;
|
||||
public readonly int[] ScreenSpaceTurretOffset = { 0, 0 };
|
||||
|
||||
public UnitInfo(string name) { Name = name; }
|
||||
|
||||
|
||||
@@ -88,8 +88,7 @@ namespace OpenRa.Game.Traits
|
||||
var quantizedFacing = bodyFacing - bodyFacing % ru.anim.CurrentSequence.Length;
|
||||
|
||||
return (RotateVectorByFacing(new float2(offset[0], offset[1]), quantizedFacing, .7f) + GetRecoil(self, recoil))
|
||||
+ new float2(self.unitInfo.ScreenSpaceTurretOffset[0],
|
||||
self.unitInfo.ScreenSpaceTurretOffset[1]);
|
||||
+ new float2(offset.ElementAtOrDefault(2), offset.ElementAtOrDefault(3));
|
||||
}
|
||||
|
||||
public static Pair<Sprite, float2> Centered(Sprite s, float2 location)
|
||||
|
||||
20
units.ini
20
units.ini
@@ -34,13 +34,11 @@ Traits=Mobile, Turreted, AttackTurreted, RenderUnitTurreted
|
||||
[MRJ]
|
||||
Description=Radar Jammer
|
||||
Traits=Mobile, RenderUnitTurreted
|
||||
PrimaryOffset=0,4
|
||||
ScreenSpaceTurretOffset=0,-6
|
||||
PrimaryOffset=0,4,0,-6
|
||||
[MGG]
|
||||
Description=Mobile Gap Generator
|
||||
Traits=Mobile, RenderUnitTurreted
|
||||
PrimaryOffset=0,6
|
||||
ScreenSpaceTurretOffset=0,-3
|
||||
PrimaryOffset=0,6,0,-3
|
||||
[ARTY]
|
||||
Description=Artillery
|
||||
Traits=Mobile, RenderUnit
|
||||
@@ -53,7 +51,7 @@ Traits=Mobile, McvDeploy, RenderUnit
|
||||
[JEEP]
|
||||
Description=Ranger
|
||||
Traits=Mobile, Turreted, AttackTurreted, RenderUnitTurreted
|
||||
ScreenSpaceTurretOffset=0,-2
|
||||
PrimaryOffset=0,0,0,-2
|
||||
[APC]
|
||||
Description=Armored Personnel Carrier
|
||||
Traits=Mobile, RenderUnit
|
||||
@@ -87,8 +85,8 @@ Description=Cruiser
|
||||
WaterBound=yes
|
||||
BuiltAt=syrd
|
||||
Traits=Mobile, Turreted, RenderUnitTurreted, AttackTurreted
|
||||
PrimaryOffset=0,17
|
||||
SecondaryOffset=0,-17
|
||||
PrimaryOffset=0,17,0,-2
|
||||
SecondaryOffset=0,-17,0,-2
|
||||
Recoil=3
|
||||
[LST]
|
||||
Description=Transport
|
||||
@@ -124,8 +122,8 @@ BuiltAt=afld
|
||||
Traits=Mobile, RenderUnit
|
||||
[TRAN]
|
||||
Description=Transport Helicopter
|
||||
PrimaryOffset=0,14
|
||||
SecondaryOffset=0,-14
|
||||
PrimaryOffset=0,14,0,-4
|
||||
SecondaryOffset=0,-14,0,-2
|
||||
BuiltAt=hpad
|
||||
Traits=Mobile, RenderUnitRotor
|
||||
[HELI]
|
||||
@@ -201,8 +199,8 @@ Footprint=xx xx
|
||||
[PDOX]
|
||||
Description=Chronosphere
|
||||
Traits=Building, RenderBuilding
|
||||
Dimensions=2,1
|
||||
Footprint=xx
|
||||
Dimensions=2,2
|
||||
Footprint=xx xx
|
||||
[WEAP]
|
||||
Description=War Factory
|
||||
Traits=Building, RenderWarFactory
|
||||
|
||||
Reference in New Issue
Block a user