wraitii
e865dc797d
Revert RedFox's changes to Spatial subdivisions in the simplest possible way (hopefully won't cause OOS, but at least we'll get reports). Fixes #2573 , Refs #2430 . There probably are opportunities to remove more things.
...
This was SVN commit r15617.
2014-08-06 09:21:00 +00:00
Itms
f7e591c9f2
Hide changes to buildings in the fog-of-war.
...
To achieve this, mirage entities are created per player, to replace the
real entities when these ones fall into the fog-of-war. These mirage
entities are created on-the-fly, and destroyed when they get back in
sight.
This depends heavily on the VisibilityChanged message added in
2174eaaeee .
As a temporary adjustment, territories do not explore the map anymore
when their borders change. See #2709 .
Fixes #599
This was SVN commit r15612.
2014-08-04 22:49:19 +00:00
Itms
ea708e14bf
Some changes on the VisibilityUpdate message system, aimed at correcting recent OOS problems.
...
I still experience troubles with serialization tests but I played a few
games without OOS. At least these changes will help us to debug more
efficiently the remaining problems.
Fixes initialization of visibility data and update order for LoS-related
systems (territory borders, etc).
Also removes a C-like array and fixes a player ID shifting.
Refs #599
This was SVN commit r15563.
2014-07-26 16:02:18 +00:00
Itms
e1d4c10f13
Recompute the number of LoS tiles whenever these tiles are reset (especially when loading serialized data).
...
Also add a verification about LoS tiles in the tests.
Fixes #2678
Refs #599
This was SVN commit r15538.
2014-07-17 19:08:06 +00:00
Itms
2174eaaeee
Add a VisibilityChanged message sent by the range manager whenever an entity changes visibility for any player.
...
This will be necessary for hiding buildings/trees/etc in fog-of-war, and
may be useful for AIs and for UnitAI.
Refs #599 .
This was SVN commit r15508.
2014-07-10 20:51:39 +00:00
JoshuaJB
548f50b071
Give gaia back it's vision.
...
This was SVN commit r15332.
2014-06-11 18:20:02 +00:00
sanderd17
e1488fee56
Add an 'explore map' option to the game setup.
...
This was SVN commit r14931.
2014-04-14 19:52:49 +00:00
JoshuaJB
883f307b40
Implement a basic observer mode. Any player which joins a multiplayer game but is not assigned a player slot automatically becomes an observer. Refs #69
...
This was SVN commit r14849.
2014-03-16 23:29:27 +00:00
JoshuaJB
8226d75715
Make PickEntitiesAtPoint faster yielding 1-3% overall performance improvement. Fixes #2358 . Also removes some trailing whitespace.
...
This was SVN commit r14532.
2014-01-07 04:05:10 +00:00
wraitii
9d9361ae44
Why you should test your code before committing, exhibit A.
...
This was SVN commit r14466.
2013-12-31 21:45:11 +00:00
wraitii
a7cafe75aa
"Reveal all player" id back to -1, add some "ensure" to catch invalid player ids and be safer.
...
This was SVN commit r14465.
2013-12-31 21:30:48 +00:00
wraitii
fe2a97b0c9
Change some useless std::map into std::vector for LOS. Player "0" now reveals the LOS for all.
...
This was SVN commit r14463.
2013-12-31 16:38:11 +00:00
sanderd17
60c986c135
* Add method to rangemanager to query around a position instead of an entity
...
* Use that method in the splash damage calculation
Fixes #2285
This was SVN commit r14283.
2013-12-04 15:30:01 +00:00
Ykkrosh
d252e245ef
Optimise fixed multiplies on MSVC x86
...
On MSVC, casting i32 to i64 then multiplying gets compiled into a call
to __allmul, which is slow. Use the __emul intrinsic instead.
GCC 4.6+ appears optimise this case automatically and doesn't need any
special handling.
This reduces the cost of ComputeShortPath by about 50% (testing AI vs AI
on Oasis 01).
This was SVN commit r13873.
2013-09-20 20:17:54 +00:00
RedFox
1b6a5fa802
This was SVN commit r13861.
2013-09-15 21:37:05 +00:00
RedFox
2a5ec404d1
Further reverted RangeManager sorting to stable_sort, since possibly with different STL implementations, the order of entities might change and cause OOS.
...
Overflowing elements in SpatialQueryArray are now reported with
debug_warn, but can be ignored and the program will continue working,
but further entities will be truncated.
This was SVN commit r13860.
2013-09-15 21:11:20 +00:00
RedFox
9694eec8b8
As per ticket #1707 . Some minor improvements to spatial subdivision. Makes way for future changes in RangeManager.
...
Right now merely improves memory usage.
This was SVN commit r13854.
2013-09-15 14:03:53 +00:00
Ykkrosh
05422ad545
Avoid slightly-expensive QueryInterface() calls
...
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.
2013-09-11 20:41:53 +00:00
alpha123
8c74df2acd
Give an elevation advantage to ranged units. Patch by sanderd17. Fix #1960 .
...
This was SVN commit r13626.
2013-08-03 19:20:20 +00:00
historic_bruno
f5e60157bf
Optimizes GetPercentMapExplored by caching explored vertices per player, patch by scroogie, fixes #2012
...
This was SVN commit r13576.
2013-07-20 00:50:40 +00:00
Ykkrosh
75a23856cf
Fix some static analysis warnings
...
This was SVN commit r13101.
2013-01-21 20:33:25 +00:00
historic_bruno
e72b603cce
Implements Vision/Range tech modification
...
This was SVN commit r12707.
2012-09-24 22:27:32 +00:00
historic_bruno
8dc36bed4e
Fixes error in actor viewer caused by 962da61f12. Fixes #1499
...
This was SVN commit r11973.
2012-06-14 22:47:57 +00:00
historic_bruno
4ac52a3c47
Fixes bug in percentage map explored calculation. Refs #1334
...
This was SVN commit r11957.
2012-06-09 23:04:27 +00:00
historic_bruno
962da61f12
Adds shared LOS for allied players, based on patch by Deiz/F00. Fixes #1334 .
...
This was SVN commit r11949.
2012-06-08 04:41:39 +00:00
leper
54fb33841e
Fix some issues.
...
This was SVN commit r11537.
2012-04-17 20:44:18 +00:00
leper
c56f96040e
Implement healing. Fixes #999 .
...
This was SVN commit r11536.
2012-04-17 20:22:13 +00:00
historic_bruno
08bd07ddd6
Adds safe bool operator to ICmpPtr, replacing the null() method, based on patch by leper. Also changes bool operator in AtSmartPtr to safe bool. Fixes #1077 .
...
Changes some CmpPtr variable names for consistency.
This was SVN commit r11036.
2012-02-08 02:46:15 +00:00
Ykkrosh
ce67dfd333
Rename CELL_SIZE to TERRAIN_TILE_SIZE, to free up the term "cell" for other concepts.
...
This was SVN commit r10902.
2012-01-12 12:51:10 +00:00
Ykkrosh
0ec4242962
Detect and fix printf signedness errors. Fixes #1086 , #1087 .
...
This was SVN commit r10846.
2012-01-01 16:43:10 +00:00
historic_bruno
8d977e4818
Allows building in fog of war. Fixes #958 .
...
This was SVN commit r10584.
2011-11-24 00:58:34 +00:00
Ykkrosh
f66a3e726f
Avoid overflow identified by /RTCc warning
...
This was SVN commit r10537.
2011-11-14 22:22:38 +00:00
Ykkrosh
fbff0aa98d
Fix printf argument types
...
This was SVN commit r10529.
2011-11-13 18:31:06 +00:00
Ykkrosh
09a02c96d5
Add initial code annotations for the new profiling tool
...
This was SVN commit r10466.
2011-11-04 01:35:50 +00:00
Ykkrosh
959b5a505c
Fix bug in incremental LOS computation
...
This was SVN commit r10446.
2011-10-28 13:15:33 +00:00
Ykkrosh
a739b8f309
Fix some saved-game OOS errors
...
This was SVN commit r10441.
2011-10-27 20:12:00 +00:00
Ykkrosh
308cb26dd4
# Health decay for buildings not in a civ center's territory.
...
This was SVN commit r10034.
2011-08-18 20:28:53 +00:00
Ykkrosh
609f1643d5
Fix -Wconversion warnings in simulation code.
...
Cast to smaller integer types explicitly.
Generally avoid platform-dependent types (size_t) in simulation code.
Use float versions of math.h functions, not double.
This was SVN commit r10017.
2011-08-16 11:18:32 +00:00
Ykkrosh
6aeb5c64de
# Remove SoD inside territories.
...
Fix some serialisation issues.
This was SVN commit r9951.
2011-08-01 21:25:12 +00:00
Ykkrosh
996a32125c
Add per-player LOS-reveal flag.
...
Reveal LOS for Gaia and AI players (fixes #879 ).
Use player_id_t slightly more consistently in interfaces.
This was SVN commit r9720.
2011-06-28 23:24:42 +00:00
Ykkrosh
92fcb737cd
Attempt minor improvements to stances code (see #865 ).
...
Don't chase units that are no longer visible, beyond where they were
last seen (fixes #595 ).
This was SVN commit r9657.
2011-06-24 12:35:15 +00:00
Badmadblacksad
71a6775b92
Stances draft, refs #865
...
This was SVN commit r9631.
2011-06-17 22:13:39 +00:00
janwas
4663ac0fe7
split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
...
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.
2011-04-30 13:01:45 +00:00
Ykkrosh
4e74798585
Be more robust to visibility checks outside the map. Fixes #765 .
...
This was SVN commit r9333.
2011-04-27 21:03:08 +00:00
Ykkrosh
caad072347
Expand pathfinder boundaries to stop units disappearing off the edge of the visible map.
...
This was SVN commit r8887.
2011-02-03 19:40:41 +00:00
Ykkrosh
fe21c5e023
# Rewrite fog-of-war rendering.
...
Disable shadows when only 2 TMUs available.
Clean up some other rendering code.
This was SVN commit r8882.
2011-02-03 01:12:24 +00:00
Ykkrosh
c3b734775b
Simplify component interface: remove explicit context parameter, use GetSimContext() instead.
...
This was SVN commit r8867.
2011-01-16 14:08:38 +00:00
fcxSanya
e4d356c3bf
Map exploration counter for summary screen
...
This was SVN commit r8679.
2010-11-21 19:42:26 +00:00
Ykkrosh
9c521ceb3b
Add minimum range to range queries
...
This was SVN commit r8627.
2010-11-16 20:43:15 +00:00
Ykkrosh
816c810791
Windows fix
...
This was SVN commit r8614.
2010-11-15 00:48:34 +00:00