1
0
forked from 0ad/0ad
Commit Graph

6020 Commits

Author SHA1 Message Date
6b8dc7684a Return in case we do not have any available JS timer slots instead of accessing OOB memory.
This was SVN commit r17263.
2015-11-15 01:09:35 +00:00
f1f0fa1f8f Fix a typo. Thanks stan for noticing.
This was SVN commit r17260.
2015-11-14 21:46:05 +00:00
3760891131 Fix the precedent fix. It turns out the code behaves in much weirder ways than I expected.
This was SVN commit r17255.
2015-11-14 19:03:20 +00:00
e7fb75a680 Initialize new variables correctly.
This was SVN commit r17247.
2015-11-12 23:07:54 +00:00
e9271025dc Forgot to serialize a new unitMotion variable, resulting in OOS on rejoin.
This was SVN commit r17245.
2015-11-12 20:57:50 +00:00
9357cce112 Math is hard
This was SVN commit r17242.
2015-11-12 17:32:33 +00:00
3febc387d5 Styling fixes.
This was SVN commit r17241.
2015-11-12 17:23:50 +00:00
52443dfe80 Fix an erroneous ENSURE in PatchRData and move it where it will be very slightly clearer. Fixes #3598
This was SVN commit r17240.
2015-11-12 17:22:44 +00:00
913545aa41 Mark several CFixedVector2D as const and passed by reference in Geometry and a few other places. Mark some functions (that probably already were) inline.
Also make sure we don't include Geometry.h where it's not necessary.

This was SVN commit r17238.
2015-11-11 20:50:02 +00:00
f3b22e51a3 Optimize Geometry::PointIsInSquare, which is used quite often in performance hotspots.
Original patch by mimo. Refs #3588

This was SVN commit r17236.
2015-11-11 20:02:47 +00:00
a138bed96b Fix an issue where units did not notice other moving units with my latest commits.
This was SVN commit r17234.
2015-11-11 19:06:07 +00:00
cc199c4cca Fix a critical typo in the last commit and a debug message left in accidentally. Thanks fabio.
This was SVN commit r17232.
2015-11-11 13:55:36 +00:00
06cb37ff74 Add PlanNextStep back to the unitMotion, in a completely different version. This basically anticipates where we'll probably move next, and checks if static units might block us. Makes paths look slightly better.
This was SVN commit r17229.
2015-11-11 13:29:06 +00:00
607955489d Check if units are in the world in UnitRenderer::PickAllEntitiesAtPoint. Probably fixes #3587, though I'm not sure as it proved unreproducible.
This was SVN commit r17228.
2015-11-11 13:27:13 +00:00
3b13fb7608 Improve unitMotion behavior. When a unit's path is obstructed, it will now try shortpathing around an increasingly large search range, to optimize behavior in trivial cases where it just needs to go around a unit.
Also stop trying too hard when we are close to the destination and our
only order is to move there.
This should result in a slight optimization of the behavior, as well as
slightly more sanity overall.

This was SVN commit r17226.
2015-11-11 12:49:24 +00:00
3ddd72c1a4 Fix a rare case where units might get stuck around other idle entities, and clarify a related comment.
Refs #3471

This was SVN commit r17225.
2015-11-11 12:28:38 +00:00
c42160ec10 Fix an issue where units could not go around large obstructions when short-pathing as it ran in the search-space "walls", reported by gamebot. Fixes #3593.
This is also a very slight optimization.

This was SVN commit r17224.
2015-11-11 12:23:11 +00:00
2f6f0bd477 Serialize everything that is needed by UpdateVisibilityData instead of assuming everything as dirty.
Fixes #3271.

This was SVN commit r17223.
2015-11-11 12:15:57 +00:00
32da740f14 Allow kicking/banning players from gamesetup and session. Patch by elexis. Fixes #3241.
This was SVN commit r17217.
2015-11-11 02:05:23 +00:00
d3ff090ce7 Fix an OOS issue where, on ownership change, units affected by speed-modifying technologies did not update their speed.
This was SVN commit r17215.
2015-11-10 23:31:06 +00:00
51ec6f4728 improve function RasterizeRectWithClearance, about 40% faster, ref #3588
This was SVN commit r17212.
2015-11-09 21:16:46 +00:00
0ba9fa1cc1 Optimize RasterizeRectWithClearance slightly further. Thanks mimo for noticing.
This was SVN commit r17209.
2015-11-08 18:08:49 +00:00
313d324fac Fix some cases of unit "dancing". Thanks to Elexis for nagging me.
This was SVN commit r17208.
2015-11-08 17:55:23 +00:00
fe040c695f Change the shape rasterization to not use DistanceToSquare, which often called sqrt. This apparently reduces total turn time by as much as 5% (!)
Refs #3368

This was SVN commit r17207.
2015-11-08 17:24:59 +00:00
cb025bb725 Removes extraneous check from XpartaMuPP. Fixes #3568.
This was SVN commit r17206.
2015-11-08 17:09:59 +00:00
dd6d09521c Not sure how but I messed up the previous commit.
This was SVN commit r17205.
2015-11-08 16:44:08 +00:00
42d0e6d46e Optimize the hierarchical pathfinder's "makeGoalReachable" slightly. Does not affect simulation results.
This was SVN commit r17204.
2015-11-08 16:39:43 +00:00
cd025b2069 fix typo
This was SVN commit r17203.
2015-11-08 13:09:49 +00:00
c319ff062d Partial fix to a formation "gliding" issue, unsure so far what is causing this.
This was SVN commit r17198.
2015-11-07 17:36:31 +00:00
3163c9d4a2 Fix a rare issue with the short-range pathfinder where units took odd paths when the target was beyond the search zone.
This was SVN commit r17197.
2015-11-07 14:33:55 +00:00
2d7074e8d6 Fix unused variables left behind.
This was SVN commit r17194.
2015-11-06 20:42:12 +00:00
596025df71 Fix a bug in [17163] that could get units with a large passability class stuck.
This was SVN commit r17192.
2015-11-06 20:33:13 +00:00
e26b59c917 Changes to unitMotion.
Make sure we do not treat as circles entities that we really should
treat as squares (such as trees). This fixes an issue reported by Stan.
Make sure we never forget about our destination if we are blocked by
unit obstructions. This makes sure that units in a group but not in
formation will not be blocked by the other units, and probably makes the
general behavior more sane. Helps following [17166]

Refs #3505, #3471, #3376

This was SVN commit r17191.
2015-11-06 20:09:18 +00:00
9efd79e240 Fix an issue where square diagonals were incorrectly handled when checking the distance to the target. Fixes #3577 properly. Patch by mimo.
Decrease fishing ship gathering range in consequence (revert [17178]).

This was SVN commit r17190.
2015-11-06 19:56:52 +00:00
1ed3761859 Fix style issues and redundant code in [17161] and [17163].
This was SVN commit r17189.
2015-11-06 19:48:08 +00:00
2126b53b9d Fixes interpolation of flying objects.
This was SVN commit r17187.
2015-11-06 16:56:39 +00:00
83bba7bdfc revert e0771b98dd which was based on misunderstanding of the algo, and fix the inverted_circle case, refs #3577
This was SVN commit r17184.
2015-11-05 19:22:04 +00:00
05547bf36f Fix an oversight.
This was SVN commit r17182.
2015-11-05 16:52:19 +00:00
a9323da01b Fix #3566 by fixing an off-by-one error in the final replay turn logic. Patch by elexis.
This was SVN commit r17180.
2015-11-04 20:33:34 +00:00
8f1853b8d8 Prevent accidental overwriting of replays in very rare cases while we wait for a better solution.
Refs #3255

This was SVN commit r17177.
2015-11-04 19:26:40 +00:00
f91478c730 Fix an oversight in the obstruction manager that lead to possibly the most insidious OOS error we've seen so far.
Fixes #3292 .

This was SVN commit r17176.
2015-11-04 18:51:47 +00:00
e527a5c321 Fix #3525 and #3399 by recalculating territories on request to GetTerritoryPercentage. Patch by elexis
This was SVN commit r17171.
2015-11-02 07:32:43 +00:00
6493974800 Fix #2676 by only acknowledging commands matching the sender's name if cheats are disabled. Based on patch by historic_bruno.
This was SVN commit r17170.
2015-11-02 03:20:44 +00:00
d9e9345be2 fix some indentation of 6e05a00929
This was SVN commit r17164.
2015-11-01 16:47:53 +00:00
357203a90f Pathfinding changes: unit-unit collisions now allow for some overlap, so units can get closer to each other, which I found improved pathfinding considerably.
Also fix a potential issue I noticed in some cases, though that
particular fix implies scrapping waypoints, so if units seem to get
lost, please report so and I'll revert those changes.

I can't find any way to get units stuck with this patch.

This was SVN commit r17163.
2015-11-01 13:38:48 +00:00
14038d4cd8 Fix more pathfinding issues.
Change the way the long-range pathfinder rasterisation works slightly so
that we have a better compatibility with the short-range pathfinder.
Should fix the "stuck units" issues, though I am not sure so I am not
marking them as fixed so far. Refs #3471, #3505, and possibly #3292.

Caveat: I am now using clearance of 0.8 for "default" class, which might
have side-effects: please report anything weird.

Also fix leftover style issues.

This was SVN commit r17161.
2015-11-01 07:28:43 +00:00
a6111ff8b7 Fix #3309 by capping m_DeltaSimTime in NetTurnManager.cpp. Patch by elexis. Review by Philip.
This was SVN commit r17159.
2015-10-31 21:04:47 +00:00
6acfec0f44 Fix a logic error in the hierarchical pathfinder that resulted in it not updating all passability classes correctly. Fixes #3538, refs #3292 (it fixes one of the cases, but not the examples).
Also features style fixes, thanks leper for noticing.

This was SVN commit r17158.
2015-10-31 20:47:47 +00:00
a3f467ae4e Make resources have a static, passable obstruction. Ought to be a temporary fix. Fixes #3530
See #3530#comment:9 for a proper fix to this issue.

This was SVN commit r17156.
2015-10-31 15:28:42 +00:00
4d804cf26b fix typo in 6e05a00929
This was SVN commit r17155.
2015-10-31 13:42:14 +00:00