leper
be1a205f91
Add support for const methods in components and make those that can be const const.
...
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D75
This was SVN commit r19156.
2017-01-20 02:25:19 +00:00
wraitii
b3b47c1718
Avoid recreating the dirtiness grid every turn by swapping. Significantly reduces the number of allocations, and slight speedup (particularly on larger maps). Reviewed by Leper.
...
Differential Revision: https://code.wildfiregames.com/D70
This was SVN commit r19149.
2017-01-17 07:24:41 +00:00
elexis
417c84870c
Actually remove trailing tabs from source/.
...
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
elexis
6149dd3841
Actually remove trailing whitespace for non-header files as well.
...
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
elexis
b18f74da44
Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
...
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
Itms
761abd587e
SpiderMonkey 38 upgrade: 10/35
...
Use operator= instead of .set(). Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1128110
This was SVN commit r18664.
2016-09-02 16:24:46 +00:00
Itms
ec2e2a84a4
Fix and improve 001c411cc2.
...
This was SVN commit r18489.
2016-07-05 20:23:12 +00:00
wraitii
898ab5229b
Change profiling calls to get a better view of what is actually slow and what is not.
...
This was SVN commit r18438.
2016-06-25 13:12:35 +00:00
wraitii
001c411cc2
Remove a division by a fixed equal to one in NearestNavcell in the short-range pathfinder which was from profiling on VC2013/windows 7 responsible for about 10% of ComputeShortPath.
...
This was SVN commit r18358.
2016-06-10 22:57:28 +00:00
Itms
5ac76ecf89
Some style fixes reported by leper.
...
This was SVN commit r18016.
2016-04-10 16:57:12 +00:00
Itms
8c436a8a41
Slight improvement of the flood filling algorithm in the hierarchical pathfinder.
...
Remove some useless check and a useless reverse loop, and add a flag to
prevent redundant checks.
Patch by fsincos, refs #3588
This was SVN commit r18011.
2016-04-09 19:47:09 +00:00
leper
27fab6bf1e
Constify Spatial.h a bit.
...
While there don't check for null when delete-ing since that is a no-op,
use the proper type instead of auto, always swap when removing a single
element (instead of comparing .size() to 1), and clean up includes.
foobar
This was SVN commit r17641.
2016-01-13 00:20:22 +00:00
elexis
8859f33b38
Rename PickFriendlyEntitiesOnScreen to PickPlayerEntitiesOnScreen.
...
Rename PickFriendlyEntitiesInRect to PickPlayerEntitiesInRect.
Rename PickSimilarFriendlyEntities to PickSimilarPlayerEntities.
Add comment.
Refs #3215 .
This was SVN commit r17622.
2016-01-10 14:47:09 +00:00
Itms
629e73a768
Fix a compiler warning.
...
This was SVN commit r17615.
2016-01-09 09:52:51 +00:00
mimo
36c08193ba
optimizes range queries, fixes #3717
...
This was SVN commit r17573.
2015-12-30 13:44:51 +00:00
elexis
abce6cb737
Pathfinder optimization, fixes #3541 .
...
Simplify the math of Geometry::TestRayAASquare.
This was SVN commit r17500.
2015-12-18 15:05:33 +00:00
mimo
a74d9be130
make const the new method introduced in 2451872731
...
This was SVN commit r17425.
2015-12-10 19:23:50 +00:00
mimo
b6dbb2bff0
fix tabs of 2451872731
...
This was SVN commit r17415.
2015-12-09 20:56:53 +00:00
mimo
2451872731
improve performance of hierarchical pathfinder, refs #3588
...
This was SVN commit r17413.
2015-12-09 19:56:30 +00:00
mimo
6a73dc2e16
fix multiple (useless) insertion in grid update of hierarchical pathfinder
...
This was SVN commit r17409.
2015-12-08 22:58:04 +00:00
mimo
0a8fc4bb08
improve pathFinder by optimizing the DistanceToSquare computation, refs #3588
...
This was SVN commit r17350.
2015-12-01 19:01:41 +00:00
mimo
be9b6fa59c
improves performance of hierarchical pathFinder, refs #3588
...
This was SVN commit r17310.
2015-11-28 13:06:44 +00:00
mimo
fc6af83c2a
cleanup 5b335442fb
...
This was SVN commit r17294.
2015-11-20 19:47:08 +00:00
mimo
5b335442fb
fix a bug in the HierarchicalPathfinder revealed by changes in 9b0ed97d05, patch by wraitii
...
This was SVN commit r17293.
2015-11-20 19:45:48 +00:00
mimo
0b2da13dea
never edit a patch before commiting !
...
This was SVN commit r17287.
2015-11-19 22:17:00 +00:00
mimo
9b0ed97d05
fixes and performance improvements in hierarchical pathfinder, fixes #3621
...
This was SVN commit r17284.
2015-11-19 22:02:25 +00:00
wraitii
9e35f7d68b
The over-rasterization of obstructions introduced in [17161] could in very rare cases lead to an OOS in the passability grid. Fixes #3612 .
...
This was SVN commit r17278.
2015-11-16 22:03:10 +00:00
wraitii
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
wraitii
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
mimo
51ec6f4728
improve function RasterizeRectWithClearance, about 40% faster, ref #3588
...
This was SVN commit r17212.
2015-11-09 21:16:46 +00:00
wraitii
0ba9fa1cc1
Optimize RasterizeRectWithClearance slightly further. Thanks mimo for noticing.
...
This was SVN commit r17209.
2015-11-08 18:08:49 +00:00
wraitii
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
wraitii
dd6d09521c
Not sure how but I messed up the previous commit.
...
This was SVN commit r17205.
2015-11-08 16:44:08 +00:00
wraitii
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
mimo
cd025b2069
fix typo
...
This was SVN commit r17203.
2015-11-08 13:09:49 +00:00
wraitii
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
wraitii
1ed3761859
Fix style issues and redundant code in [17161] and [17163].
...
This was SVN commit r17189.
2015-11-06 19:48:08 +00:00
wraitii
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
wraitii
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
mimo
70d5e4e318
fix the INVERTED_CIRCLE and INVERTED_SQUARE PathGoal, fixes #3405
...
This was SVN commit r17142.
2015-10-18 20:21:20 +00:00
historic_bruno
4043c56518
Fixes global init order bug that caused OOS between OS X and other platforms, fixes #3499 . May improve pathfinding behavior in some cases, please test!
...
This was SVN commit r17132.
2015-10-15 02:51:12 +00:00
Itms
e0093c8ecc
Remove an unused function (it was used by the old pathfinder).
...
This was SVN commit r17103.
2015-10-04 18:02:16 +00:00
Itms
2505a2ec70
Remove a preprocessor ambiguity, fixes #3480 .
...
This was SVN commit r17101.
2015-10-04 17:21:36 +00:00
Itms
d60940ac59
Code improvements and style fixes.
...
This was SVN commit r17095.
2015-10-03 08:27:19 +00:00
Itms
2132f868b8
Replace the rectangle rasterization algorithm by the original version from Philip's branch.
...
The current version is flawed (it doesn't handle the partially
obstructed cells as it should).
Refs #3410 .
This was SVN commit r17084.
2015-09-27 16:46:26 +00:00
Itms
03d2c5e40b
Support inverted goals with the long-range pathfinder. This allows units to flee and should fix problems with ranged units too close to their targets. Fixes #3405 , refs #3372 .
...
Now that units flee it's necessary to fix the unit chasing: this commit
reintroduces some code from 298115f4c5 that disappeared with the
committing of the new pathfinder. Refs #1537 .
Also includes some style improvements to the UnitMotion code.
This was SVN commit r17013.
2015-09-13 09:33:09 +00:00
leper
558d43bac5
Replace some functor structs with lambdas, closures or range-based fors.
...
This was SVN commit r16923.
2015-08-19 03:33:04 +00:00
Itms
1c9ea56800
Fix the CheckLineMovement algorithm. Added some comments and a test to avoid problems.
...
This addresses some "stuck units" cases.
This was SVN commit r16918.
2015-08-13 16:21:39 +00:00
Itms
01de76f4be
Code improvements for the hierarchical pathfinder: cache hits and variable initialization.
...
This was SVN commit r16917.
2015-08-11 15:21:11 +00:00
Itms
28ef270571
Enhance the MakeGoalReachable algorithm to handle better non-point goals.
...
Fixes #3363 , #3297 .
This was SVN commit r16915.
2015-08-11 09:47:08 +00:00