The function was put in an anonymous namespace to avoid linking errors
should another one be defined elsewhere.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2243
This was SVN commit r22825.
Units can be stuck in gather states when the target ought to be
collectable from, but it's actually unreachable.
A new FINDINGNEWTARGET intermediate state for GATHER will try and find a
new, different target to collect from. This should generally improve the
behaviour (perfect reachability checks would be required to completely
fix it).
Use this also when the target is knowably unreachable / uncollectible.
Fixes#5529
Differential Revision: https://code.wildfiregames.com/D2120
This was SVN commit r22816.
Using references matches the C++ coding style better and should improve
performance a bit in theory. It avoids 2 copies of T in case of the
functions registered with RegisterFunction (mainy used in the GUI). It
should also avoid one or two copies in case of
DEFINE_INTERFACE_METHOD_X, which is used in the simulation, but I
haven't bothered to count it there exactly.
It is now predefined which types have to be passed by const reference
and which are passed by value. Note that references can't be used as
out-parameters (to return multiple values to JS). This hasn't worked
before either and probably never will.
This was SVN commit r17696.
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.
Rename PickFriendlyEntitiesInRect to PickPlayerEntitiesInRect.
Rename PickSimilarFriendlyEntities to PickSimilarPlayerEntities.
Add comment.
Refs #3215.
This was SVN commit r17622.
This subdivision is faster but less precise, so range queries get more
entities and are a bit slower (up to 1ms approx.), but the overall gain
on a simulation update is always positive and can reach 10ms per frame.
For now, this new subdivision is only used by the range manager,
integrating it in the obstruction manager might be sensible.
Refs #2430
This was SVN commit r16540.
This improves performance quite a lot because it avoids a huge number of
calls from C++ to JS. Check the ticket for performance measurements.
Refs #2913
This was SVN commit r16337.
Fixes the animals hidden in the FoW, and adds the missing status bars
for mirages.
Also small cleanup of the code.
Refs #2913
This was SVN commit r16281.
Add CEntityHandle which wraps an entity_id_t and also has a pointer to a
per-entity array of IComponents. QueryInterface/CmpPtr on a handle just
involve a couple of pointer dereferences instead of a map lookup.
This requires sizeof(void*) per registered interface type per entity,
which is currently ~0.5KB per entity, which shouldn't be a problem.
This was SVN commit r13825.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)
This was SVN commit r9362.