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