Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI - Remove blueprint threat rounding #6052

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/3807.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Previously, the cost of enhancements for an SACU preset was added to the veteran

Previously the Ythotha would use the same texture that the ACU does, but scaled up. It now uses a custom made texture that better fits the shape. It's not perfect, if you're interested in improving it then do get in touch with us!

# AI

- (6052) Remove rounding performed on AI unit threat level calculations to improve threat assignment and variation between units.

## Other Changes

- (#6037) Various smaller improvements to the additional unit details displayed when `Show Armament Detail in Build Menu` is enabled in the settings.
Expand Down
10 changes: 0 additions & 10 deletions lua/system/blueprints-ai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,6 @@ function SetUnitThreatValues(unitBPs)
end
end

-- Sanitise the table
for i, v in cache do
-- Round appropriately
if v < 1 then
cache[i] = 0
else
cache[i] = MathFloor(v + 0.5)
end
end

-- transfer information to blueprint table
for k, v in cache do
bp.Defense[k] = v
Expand Down