Commit Graph

1097 Commits

Author SHA1 Message Date
Paul Chote
080f1880b9 Make RenderBuildingTurreted fields readonly. 2015-08-01 13:27:40 +01:00
Paul Chote
ef619a186c Make ExternalCapturableBar fields readonly. 2015-08-01 13:27:09 +01:00
abcdefg30
b8372984b0 Merge pull request #8247 from Mailaender/man-openra
Added a UNIX man page
2015-08-01 12:06:14 +02:00
reaperrr
a8c09f4035 Merge pull request #8846 from pchote/ingame-map-previews
Improve radar minimap on isometric maps.
2015-08-01 11:59:21 +02:00
Matthias Mailänder
7c86519242 organize launch arguments in it's own class 2015-08-01 11:56:45 +02:00
Matthias Mailänder
baa798d831 autogenerate and install a UNIX man page 2015-08-01 11:56:43 +02:00
Matthias Mailänder
88e16a890d extract Launch args for automatic manpage creation 2015-08-01 11:55:46 +02:00
abcdefg30
9d32667d15 Merge pull request #8860 from pchote/heightmap-placebuilding-footprint
Align the footprint tiles with the building preview.
2015-08-01 10:32:57 +02:00
Paul Chote
aebca2bdae Align the footprint tiles with the building preview. 2015-07-31 23:36:40 +01:00
reaperrr
5941914ced Fix WithProductionDoorOverlay namespace 2015-07-31 21:08:25 +02:00
Paul Chote
ed359c8aeb Improve radar display for isometric maps. 2015-07-31 08:34:16 +01:00
Paul Chote
372d93994c Account for heightmaps in choosing the minimap bounds. 2015-07-31 08:34:16 +01:00
Oliver Brakmann
439bc4ab34 Revert "HACK: Testcase for edge clamping."
This reverts commit fb84f1157e.
2015-07-30 16:36:40 +02:00
Paul Chote
fb84f1157e HACK: Testcase for edge clamping.
Remove before merging!
2015-07-30 08:18:45 +01:00
Paul Chote
66f4e1d775 Render the full map to the radar backing sheet. 2015-07-30 08:18:39 +01:00
Paul Chote
af69370c17 Improve lobby minimap display for isometric maps.
Also extracts a trait query from inside a tight loop to save unnecessary work.
2015-07-29 20:44:44 +01:00
reaperrr
398f02c5db Remove redundant ISync and ITick from Attack* traits
ISync is implemented by AttackBase, so there's no need for other Attack traits to implement it again.
AttackTurreted inherits AttackFollow, which already implements ITick.
2015-07-29 17:45:30 +02:00
Matthias Mailänder
c660d32051 Merge pull request #8833 from obrakmann/fix8826_trait-from-dead-crate-crash
Fix crates dying while not in the world
2015-07-29 15:30:07 +02:00
Matthias Mailänder
8eb5698d57 Merge pull request #8170 from DSUK/master
TFD Installer for Tiberian dawn, Red Alert and Tiberian Sun
2015-07-29 15:25:59 +02:00
Oliver Brakmann
1b9367ae4b Fix potential NRE in AI BaseBuilder
Detected by Coverity
2015-07-29 14:53:15 +02:00
Oliver Brakmann
eada254ad3 Fix crates dying while not in the world
On large maps, it can take the delivery aircraft longer than the crate's
lifetime to reach the paradrop location, so the crate will be destroyed while it's still in the aircraft, leading to an attempt to get a trait from a destroyed object in the Paradrop trait.

This fixes the lifetime logic of crates so that the lifetime will only be increased when the crate is actually in the world. This will probably also better reflect the intention behind the Lifetime property, which I assume was meant to be the time the crate would be on the map available for pickup, rather than the lifetime of the actor itself.
2015-07-29 12:35:58 +02:00
James
1d3f4d6f12 added The First Decade Installation Logic 2015-07-29 08:18:26 +01:00
Matthias Mailänder
0ba54b425e Merge pull request #8759 from reaperrr/ai-bldgcheck
Improved AI BaseBuilder
2015-07-28 22:32:21 +02:00
reaperrr
d8e458d028 Added TODOs for foundation of checked water cells
Fix description style issues
2015-07-28 22:03:53 +02:00
reaperrr
91178d6f62 Improved naval placement check
Moved water checks before --waitTicks.
Use Water enum instead of multiple booleans.
Check for BaseProvider rather than BaseBuilding.
Move expensive ClosEnoughToWater check to last position for naval
production override.
2015-07-28 22:03:52 +02:00
Matthias Mailänder
e127e55792 Merge pull request #8777 from pchote/base-key
Fall back to oldest building if no BaseBuildings exist.
2015-07-28 20:35:12 +02:00
Oliver Brakmann
dff56f6c20 Merge pull request #8781 from pchote/heightmap-shroud
Add plumbing for heighmap-aware shroud and map bounds checks.
2015-07-28 15:35:51 +02:00
Pavel Penev
9801d89e75 Merge pull request #8813 from pchote/fix-bounds-checks
Replace map.Contains with proper array bounds checks.
2015-07-28 04:27:53 +03:00
Matthias Mailänder
9fefc1f7b7 Merge pull request #8816 from reaperrr/common-armor
Moved Armor trait to Mods.Common
2015-07-27 22:04:29 +02:00
reaperrr
89f3718aa7 Move Armor trait to Mods.Common 2015-07-27 21:12:03 +02:00
Paul Chote
86ba26e013 Convert shroud calculations and rendering to PPos. 2015-07-27 19:34:50 +01:00
Paul Chote
e8794032e0 Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in
screen space.  Multiple cells with different
terrain heights may be projected to the same PPos,
or to multiple PPos if they do not align with the
screen grid.

PPos coordinates are used primarily for map edge
checks and shroud / visibility queries.
2015-07-27 19:34:49 +01:00
Paul Chote
a8c6a1aa97 Correct Contains check in DomainIndex. 2015-07-27 19:06:20 +01:00
Paul Chote
3a7300810c Correct Contains check in BridgeLayer. 2015-07-27 19:06:20 +01:00
Paul Chote
0b5b612757 Correct Contains check in BuildingInfluence. 2015-07-27 18:43:51 +01:00
Matthias Mailänder
3b25a2029a Merge pull request #8805 from obrakmann/fix8802_enemy-unit-selection
Fix not being able to select enemy units
2015-07-27 19:38:37 +02:00
reaperrr
76f2145db2 Added random factor to building production delay
Early game AI usually follows the same build order (power plant first, then refinery), which also means they all start producing them at the same tick. This adds a random factor to the production delay, so not all AIs produce on the same tick.
2015-07-27 13:28:07 +02:00
reaperrr
c7af9c180e Further improved building placement failure check
Since naval structures have their own safety measures now and therefore shouldn't count towards failCount under normal circumstances, we can now assume that 3 consecutive placement failures mean lack of space. Therefore, rather than unconditionally resetting the failCount and retry every N ticks, we now cache the number of buildings and construction yards at the time of the 3rd consecutive failure and if the number of buildings hasn't decreased and number of construction yards not increased, we assume there is still not enough space and reset the retry delay instead.
2015-07-27 13:28:06 +02:00
reaperrr
65a6489ef1 Avoid consecutive attempts to build naval structures
If not enough water space can be found inside the base perimeter, stop the AI from trying to build naval production buildings permanently until it deploys another construction yard.

If enough water is available within the base perimeter, check whether any
building that provides buildable area (for adjacency) is close enough to
water, otherwise don't even start producing this naval structure.
2015-07-27 13:28:05 +02:00
reaperrr
0a5b812bb7 Check for consecutive failures to place a structure.
After 3 consecutive failed attempts, wait one minute before resetting the counter and trying again.
2015-07-27 13:21:58 +02:00
Oliver Brakmann
618ba6342c Fix not being able to select enemy units 2015-07-27 13:07:07 +02:00
reaperrr
6ff394991d Fixed AI BaseBuilder low power check.
This was extremely borked:
The priority overrides for refinery, production and silo ignored power completely and never checked whether the structure might drive the AI into low power state; whereas the check for regular building checked whether the structure's power -exceeded- MinimumExcessPower (previously just 0). The catch is that power draw is represented by negative numbers, so the only buildings that would trigger this were - power plants.
Now it checks whether the sum of building power draw (negative) and AI's current power level are lower than MinimumExcessPower, if not, build the structure, if yes, build a power plant instead.
Additionally, this check is now performed for the early-game priority overrides as well.

Last but not least the AI would not(!) give power plants priority if it was already low on power. This has been fixed as well.
2015-07-27 13:06:18 +02:00
Matthias Mailänder
a3eac88e36 Merge pull request #8774 from atlimit8/v19husk_noRenderBuilding
Add StartSequence to WithIdleOverlay & change V19.Husk
2015-07-27 07:50:18 +02:00
Matthias Mailänder
00017a9b4e Merge pull request #8770 from RoosterDragon/ai-order-throttle
Throttle AI order speed to prevent lag spikes
2015-07-27 07:37:01 +02:00
atlimit8
4976f9fec9 Add StartSequence to WithIdleOverlay & change V19.Husk 2015-07-26 12:53:09 -05:00
RoosterDragon
942ce6b5a6 Throttle the issuing of orders by the AI.
To prevent the AI generating lag spikes by issuing too many orders in a single tick, it is now limited in how many orders can be issued per tick. Extra orders are queued. This allows the performance hit of issuing multiple orders to be spread out over several ticks.
2015-07-26 12:57:19 +01:00
Oliver Brakmann
bb40d57944 Merge pull request #8791 from penev92/bleed_cancelActivity
Fix an NRE when cancelling repair orders on units at the wrong time
2015-07-26 11:09:56 +02:00
Pavel Penev
cccf5c5931 Check if the inner activity is null before trying to cancel it 2015-07-26 02:15:38 +03:00
Oliver Brakmann
b749548e76 Re-enable replays for missions 2015-07-25 20:51:39 +02:00
Oliver Brakmann
4de03e991c Remove revealing views from observer mode in missions 2015-07-25 20:51:39 +02:00