Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
Fix targeting bones and collision boxes of a wide range of units (FAF…
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas authored and MrRowey committed Sep 25, 2023
1 parent 1bd9aac commit 4194f2c
Show file tree
Hide file tree
Showing 119 changed files with 268 additions and 297 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ This specifically occurred with the tech 3 strategic submarines and the tech 3 S

This occurs when you issue launch orders and then distribute them. The new, distributed orders are processed and removed from the queue even though no missiles have been launched.

- (#5470) Fix a bug that cause gunships to have a tough time to hit certain units.

When a projectile experiences multiple collisions in a single tick, the engine does not always return the first collision. This issue frequently occurs with gunships, as they often fire from nearly vertical angles. Consequently, gunships can appear to 'hit' the terrain, even though they clearly hit the intended unit. To resolve this, we now ensure that every collision box of every unit has a minimum length of 0.5 ogrids.

- (#5470) Fix a bug that allows certain units to evade beams in specific conditions

Most notable the Brick no longer has the ability to evade beams.

## Contributors

With thanks to the following individuals who contributed through coding:
Expand Down
6 changes: 6 additions & 0 deletions lua/system/blueprints-units.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ local function PostProcessUnit(unit)
, tostring(unit.BlueprintId), tostring(0.1 * speed), tostring(speed)))
unit.SizeZ = 0.1 * speed
end

if unit.SizeY < 0.5 then
WARN(string.format("Overriding the y axis of collision box of unit ( %s ), it should be atleast 0.5 to guarantee proper functioning gunships"
, tostring(unit.BlueprintId), tostring(0.1 * speed), tostring(speed)))
unit.SizeY = 0.5
end
end
end
end
Expand Down
8 changes: 8 additions & 0 deletions lua/ui/lobby/changelogData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ gamePatches = {
"This occurs when you issue launch orders and then distribute them. The new, distributed orders are processed and removed from the queue even though ",
"no missiles have been launched.",
"",
"- (#5470) Fix a bug that cause gunships to have a tough time to hit certain units.",
"",
"When a projectile experiences multiple collisions in a single tick, the engine does not always return the first collision. This issue frequently occurs with gunships, as they often fire from nearly vertical angles. Consequently, gunships can appear to 'hit' the terrain, even though they clearly hit the intended unit. To resolve this, we now ensure that every collision box of every unit has a minimum length of 0.5 ogrids.",
"",
"- (#5470) Fix a bug that allows certain units to evade beams in specific conditions",
"",
"Most notable the Brick no longer has the ability to evade beams.",
"",
"## Contributors",
"",
"With thanks to the following individuals who contributed through coding:",
Expand Down
2 changes: 1 addition & 1 deletion units/DAL0310/DAL0310_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ UnitBlueprint{
SelectionThickness = 0.37,
CollisionOffsetZ = 0.1,
SizeX = 0.8,
SizeY = 0.3,
SizeY = 0.5,
SizeZ = 1.1,
StrategicIconName = "icon_land3_antishield",
StrategicIconSortPriority = 135,
Expand Down
2 changes: 1 addition & 1 deletion units/DEL0204/DEL0204_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ UnitBlueprint{
SelectionSizeX = 0.6,
SelectionSizeZ = 0.5,
SelectionThickness = 0.62,
SizeX = 0.7,
SizeX = 0.9,
SizeY = 1,
SizeZ = 1,
StrategicIconName = "icon_bot2_directfire",
Expand Down
10 changes: 2 additions & 8 deletions units/DRL0204/DRL0204_unit.bp
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
UnitBlueprint{
Description = "<LOC drl0204_desc>Rocket Bot",
AI = {
TargetBones = {
"Torso",
"Turret_Barrel",
},
},
Audio = {
AmbientMove = Sound { Bank = 'URL', Cue = 'URL0107_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' },
Destroyed = Sound { Bank = 'URLDestroy', Cue = 'URL_Destroy_Land', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down Expand Up @@ -183,8 +177,8 @@ UnitBlueprint{
SelectionSizeX = 0.75,
SelectionSizeZ = 0.85,
SelectionThickness = 0.5,
SizeX = 0.45,
SizeY = 0.8,
SizeX = 0.6,
SizeY = 1.0,
SizeZ = 0.9,
StrategicIconName = "icon_bot2_directfire",
StrategicIconSortPriority = 135,
Expand Down
8 changes: 1 addition & 7 deletions units/DRLK001/DRLK001_unit.bp
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
UnitBlueprint{
Description = "<LOC DRLK001_desc>Mobile Missile Anti-Air",
AI = {
TargetBones = {
"Turret01",
"DRLK001",
},
},
Audio = {
AmbientMove = Sound { Bank = 'URL', Cue = 'URL0107_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' },
Construct = Sound { Bank = 'URL', Cue = 'URL0208_Construct_Start', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down Expand Up @@ -155,7 +149,7 @@ UnitBlueprint{
SelectionSizeZ = 0.9,
SelectionThickness = 0.62,
SizeX = 1.2,
SizeY = 0.6,
SizeY = 0.9,
SizeZ = 1.1,
StrategicIconName = "icon_bot3_antiair",
StrategicIconSortPriority = 155,
Expand Down
3 changes: 0 additions & 3 deletions units/DSLK004/DSLK004_unit.bp
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
UnitBlueprint{
Description = "<LOC dslk004_desc>Lightning Tank",
AI = {
TargetBones = { "AttachPoint" },
},
Audio = {
AmbientMove = Sound { Bank = 'XSL', Cue = 'XSL0303_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' },
Destroyed = Sound { Bank = 'XSL_Destroy', Cue = 'XSL_Destroy_Land_Lrg', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down
5 changes: 3 additions & 2 deletions units/UAB0103/UAB0103_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ UnitBlueprint{
SelectionSizeX = 2.5,
SelectionSizeZ = 6.5,
SelectionThickness = 0.26,
CollisionOffsetX = 0,
CollisionOffsetY = -1,
CollisionOffsetZ = 0,
CollisionOffsetZ = 1.5,
SizeX = 4,
SizeY = 3,
SizeZ = 10,
SizeZ = 10.5,
StrategicIconName = "icon_factory1_naval",
StrategicIconSortPriority = 220,
Wreckage = {
Expand Down
1 change: 1 addition & 0 deletions units/UAB0201/UAB0201_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ UnitBlueprint{
TargetBones = {
"B01",
"B02",
"Attachpoint"
},
},
Audio = {
Expand Down
5 changes: 3 additions & 2 deletions units/UAB0203/UAB0203_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ UnitBlueprint{
SelectionSizeX = 2.5,
SelectionSizeZ = 7.5,
SelectionThickness = 0.23,
CollisionOffsetX = 0,
CollisionOffsetY = -1,
CollisionOffsetZ = 0,
CollisionOffsetZ = 1,
SizeX = 4,
SizeY = 3,
SizeZ = 10,
SizeZ = 12,
StrategicIconName = "icon_factoryhq2_naval",
StrategicIconSortPriority = 215,
Wreckage = {
Expand Down
1 change: 1 addition & 0 deletions units/UAB0301/UAB0301_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ UnitBlueprint{
TargetBones = {
"B01",
"B02",
"Attachpoint",
},
},
Audio = {
Expand Down
3 changes: 2 additions & 1 deletion units/UAB0303/UAB0303_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ UnitBlueprint{
SelectionSizeX = 2.5,
SelectionSizeZ = 8.8,
SelectionThickness = 0.2,
CollisionOffsetX = 0,
CollisionOffsetY = -1,
CollisionOffsetZ = 0,
SizeX = 4,
SizeY = 3,
SizeZ = 10,
SizeZ = 14.5,
StrategicIconName = "icon_factoryhq3_naval",
StrategicIconSortPriority = 210,
Wreckage = {
Expand Down
1 change: 1 addition & 0 deletions units/UAB0304/UAB0304_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ UnitBlueprint{
"Target_Right_01",
"Target_Right_02",
"Target_Right_03",
"Attachpoint",
},
},
Audio = {
Expand Down
7 changes: 0 additions & 7 deletions units/UAB1103/UAB1103_unit.bp
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
UnitBlueprint{
Description = "<LOC uab1103_desc>Mass Extractor",
AI = {
TargetBones = {
"Turret01_B02",
"Turret02_B02",
"Turret03_B02",
},
},
Adjacency = "T1MassExtractorAdjacencyBuffs",
Audio = {
ActiveLoop = Sound { Bank = 'UAB', Cue = 'UAB1103_Active', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down
1 change: 0 additions & 1 deletion units/UAB2104/UAB2104_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ UnitBlueprint{
AI = {
TargetBones = {
"Turret",
"Wall01",
},
},
Audio = {
Expand Down
3 changes: 0 additions & 3 deletions units/UAB2304/UAB2304_unit.bp
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
UnitBlueprint{
Description = "<LOC uab2304_desc>Anti-Air SAM Launcher",
AI = {
TargetBones = { "Turret_Barrel" },
},
Audio = {
Destroyed = Sound { Bank = 'UALDestroy', Cue = 'UAB_Destroy_Land', LodCutoff = 'UnitMove_LodCutoff' },
DoneBeingBuilt = Sound { Bank = 'UAB', Cue = 'UAB2304_Activate', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down
6 changes: 0 additions & 6 deletions units/UAB5101/UAB5101_unit.bp
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
UnitBlueprint{
Description = "<LOC uab5101_desc>Wall Section",
AI = {
TargetBones = {
"Wall01",
"Lid",
},
},
Audio = {
Destroyed = Sound { Bank = 'UALDestroy', Cue = 'UAB_Destroy_Huge', LodCutoff = 'UnitMove_LodCutoff' },
UISelection = Sound { Bank = 'Interface', Cue = 'Aeon_Select_Structure', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down
1 change: 1 addition & 0 deletions units/UAL0101/UAL0101_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ UnitBlueprint{
SelectionSizeX = 0.4,
SelectionSizeZ = 0.4,
SelectionThickness = 0.9,
SelectionCenterOffsetY = -0.1,
CollisionOffsetY = -0.1,
CollisionOffsetZ = 0.05,
SizeX = 0.6,
Expand Down
4 changes: 2 additions & 2 deletions units/UAL0103/UAL0103_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ UnitBlueprint{
SelectionSizeX = 0.35,
SelectionSizeZ = 0.45,
SelectionThickness = 0.8,
SizeX = 0.55,
SizeY = 0.25,
SizeX = 0.5,
SizeY = 0.5,
SizeZ = 1,
StrategicIconName = "icon_land1_artillery",
StrategicIconSortPriority = 135,
Expand Down
2 changes: 1 addition & 1 deletion units/UAL0104/UAL0104_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ UnitBlueprint{
SelectionSizeZ = 0.55,
SelectionThickness = 0.67,
SizeX = 0.7,
SizeY = 0.7,
SizeY = 0.5,
SizeZ = 1,
StrategicIconName = "icon_land1_antiair",
StrategicIconSortPriority = 135,
Expand Down
2 changes: 1 addition & 1 deletion units/UAL0111/UAL0111_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ UnitBlueprint{
SelectionThickness = 0.5,
CollisionOffsetZ = 0.1,
SizeX = 0.75,
SizeY = 0.3,
SizeY = 0.5,
SizeZ = 1.1,
StrategicIconName = "icon_land2_missile",
StrategicIconSortPriority = 125,
Expand Down
2 changes: 1 addition & 1 deletion units/UAL0202/UAL0202_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ UnitBlueprint{
SelectionSizeZ = 0.75,
SelectionThickness = 0.53,
CollisionOffsetZ = 0.1,
SizeX = 0.8,
SizeX = 1.0,
SizeY = 0.5,
SizeZ = 0.9,
StrategicIconName = "icon_land2_directfire",
Expand Down
5 changes: 3 additions & 2 deletions units/UAL0205/UAL0205_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ UnitBlueprint{
SelectionSizeZ = 0.65,
SelectionThickness = 0.56,
CollisionOffsetZ = 0,
SizeX = 0.9,
SizeY = 0.3,
CollisionOffsetY = -0.1,
SizeX = 1.0,
SizeY = 0.5,
SizeZ = 0.9,
StrategicIconName = "icon_land2_antiair",
StrategicIconSortPriority = 125,
Expand Down
4 changes: 0 additions & 4 deletions units/UAL0301/UAL0301_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ UnitBlueprint{
Description = "<LOC ual0301_desc>Support Armored Command Unit",
AI = {
GuardScanRadius = 26,
TargetBones = {
"Torso",
"AttachPoint",
},
},
Audio = {
CaptureLoop = Sound { Bank = 'UAL', Cue = 'UAL0301_Capture_Loop', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down
3 changes: 1 addition & 2 deletions units/UAL0303/UAL0303_unit.bp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
UnitBlueprint{
Description = "<LOC ual0303_desc>Heavy Assault Bot",
AI = {},
Audio = {
AmbientMove = Sound { Bank = 'UAL', Cue = 'UAL0303_Move_Loop', LodCutoff = 'UnitMove_LodCutoff' },
Construct = Sound { Bank = 'UAL', Cue = 'UAL0309_Construct_Start', LodCutoff = 'UnitMove_LodCutoff' },
Expand Down Expand Up @@ -195,7 +194,7 @@ UnitBlueprint{
SelectionThickness = 0.5,
CollisionOffsetY = 0,
SizeX = 1,
SizeY = 1.5,
SizeY = 1.7,
SizeZ = 1.2,
StrategicIconName = "icon_bot3_directfire",
StrategicIconSortPriority = 115,
Expand Down
2 changes: 1 addition & 1 deletion units/UAL0304/UAL0304_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ UnitBlueprint{
SelectionSizeZ = 1,
SelectionThickness = 0.43,
SizeX = 1,
SizeY = 0.4,
SizeY = 0.5,
SizeZ = 1.5,
StrategicIconName = "icon_land3_artillery",
StrategicIconSortPriority = 115,
Expand Down
6 changes: 3 additions & 3 deletions units/UAL0307/UAL0307_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ UnitBlueprint{
SelectionSizeX = 0.55,
SelectionSizeZ = 0.55,
SelectionThickness = 0.68,
SizeX = 0.8,
SizeY = 0.5,
SizeZ = 0.8,
SizeX = 1.0,
SizeY = 0.6,
SizeZ = 1.0,
StrategicIconName = "icon_land2_shield",
StrategicIconSortPriority = 125,
Transport = { TransportClass = 2 },
Expand Down
8 changes: 5 additions & 3 deletions units/UAS0302/UAS0302_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ UnitBlueprint{
TargetBones = {
"UAS0302",
"Turret_Middle",
"Turret_Front",
"Turret_Back",
"Exhaust01",
"Exhaust02",
},
Expand Down Expand Up @@ -221,7 +223,7 @@ UnitBlueprint{
},
},
RackFireTogether = false,
RackRecoilDistance = 0,
RackRecoilDistance = -1,
RackReloadTimeout = 10,
RackSalvoChargeTime = 0,
RackSalvoReloadTime = 0,
Expand Down Expand Up @@ -285,7 +287,7 @@ UnitBlueprint{
},
},
RackFireTogether = false,
RackRecoilDistance = 0,
RackRecoilDistance = -1,
RackReloadTimeout = 10,
RackSalvoChargeTime = 0,
RackSalvoReloadTime = 0,
Expand Down Expand Up @@ -349,7 +351,7 @@ UnitBlueprint{
},
},
RackFireTogether = false,
RackRecoilDistance = 0,
RackRecoilDistance = -1,
RackReloadTimeout = 10,
RackSalvoChargeTime = 0,
RackSalvoReloadTime = 0,
Expand Down
7 changes: 6 additions & 1 deletion units/UAS0303/UAS0303_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ UnitBlueprint{
RepairConsumeMass = 0,
StagingPlatformScanRadius = 300,
TargetBones = {
"UAS0303",
"Attachpoint01",
"Attachpoint02",
"Attachpoint03",
"Attachpoint04",
"Attachpoint05",
"Attachpoint06",
"Exhaust01",
"Exhaust02",
},
Expand Down
2 changes: 2 additions & 0 deletions units/UAS0304/UAS0304_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ UnitBlueprint{
TargetBones = {
"Muzzle_04",
"Muzzle_05",
"Exhaust_01",
"Exhaust_02",
},
},
Audio = {
Expand Down
Loading

0 comments on commit 4194f2c

Please sign in to comment.