0ad/source/simulation2/components
wraitii 7350b9042e Don't poll territory in Position component
CmpPosition::TurnStart checks whether the territory changed underneath
each entityevery turn. The only user of this is TerritoryDecay
(structures, for the most part). It is rather inefficient to have this
done for all entities.
The simplest solution is to listen to position-changed messages in
TerritoryDecay instead. This should hardly ever happen in vanilla 0
A.D., except in Atlas, so it's basically free.

This sort of reverts 19965ce37a (original implementation) and
c44b48bd59.

Accepted By: Freagarach (concept only)
Differential Revision: https://code.wildfiregames.com/D5009
This was SVN commit r27673.
2023-06-13 15:48:03 +00:00
..
tests Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpAIManager.cpp Allow other root XML than entity. 2022-12-30 07:34:23 +00:00
CCmpCinemaManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpCommandQueue.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpDecay.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpFootprint.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpMinimap.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpMotionBall.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpObstruction.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpObstructionManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpOverlayRenderer.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpOwnership.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpParticleManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpPathfinder.cpp Use Future::CancelOrWait in pathfinder Deinit 2022-12-28 11:34:04 +00:00
CCmpPathfinder_Common.h Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpPosition.cpp Don't poll territory in Position component 2023-06-13 15:48:03 +00:00
CCmpProjectileManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpRallyPointRenderer.cpp Moves texture management to CDeviceCommandContext, adds quality options. 2022-02-13 19:30:28 +00:00
CCmpRallyPointRenderer.h Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpRangeManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpRangeOverlayRenderer.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpSelectable.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpSoundManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpTemplateManager.cpp Allow other root XML than entity. 2022-12-30 07:34:23 +00:00
CCmpTerrain.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpTerritoryInfluence.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpTerritoryManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpTest.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpUnitMotion.h UnitMotion - Fix Clearance serialization and only allow changing passability of formation controllers. 2022-05-09 17:29:15 +00:00
CCmpUnitMotion_System.cpp Allow giving different weights to different templates when pushing. 2022-01-30 14:22:27 +00:00
CCmpUnitMotionManager.h Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpUnitRenderer.cpp Reduces the uniform size of an instancing transform of overlay solid shader. 2022-11-06 20:04:26 +00:00
CCmpVision.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpVisualActor.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
CCmpWaterManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpAIInterface.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpAIInterface.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpAIManager.cpp Split off JSON-related function from ScriptInterface, clean up headers. 2021-05-14 10:18:03 +00:00
ICmpAIManager.h Choose AI behavior in gamesetup 2017-12-20 22:02:15 +00:00
ICmpAttack.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpAttack.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpCinemaManager.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpCinemaManager.h Draw paths only when cinematics isn't playing. Patch by Vladislav. 2017-05-08 04:02:33 +00:00
ICmpCommandQueue.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpCommandQueue.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpDecay.cpp # Add corpse decay and building collapse. 2010-08-01 17:38:01 +00:00
ICmpDecay.h # Add corpse decay and building collapse. 2010-08-01 17:38:01 +00:00
ICmpFogging.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpFogging.h Reduce drastically the number of mirages by making fogging conditional: entities will be miraged only if their health/resource amount is modified, or if they have a non-gaia owner. 2015-02-07 15:48:32 +00:00
ICmpFootprint.cpp Split JS conversions from ScriptInterface. 2021-05-13 09:43:33 +00:00
ICmpFootprint.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpGarrisonHolder.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpGarrisonHolder.h Fix some C++-style notes from b5df81af76. 2021-01-11 11:26:31 +00:00
ICmpGuiInterface.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpGuiInterface.h Removes unused forward declarations of class and struct. 2021-09-08 19:43:01 +00:00
ICmpIdentity.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpIdentity.h Move GenericName, History and Icon from the civ-JSON to cmpIdentity. 2022-02-05 06:24:45 +00:00
ICmpMinimap.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpMinimap.h Adds icons to minimap. 2022-03-07 01:22:06 +00:00
ICmpMirage.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpMirage.h Hide changes to buildings in the fog-of-war. 2014-08-04 22:49:19 +00:00
ICmpMotion.cpp
ICmpMotion.h
ICmpObstruction.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpObstruction.h Add a simple 'pushing' logic to unit motion to improve movement. 2021-04-02 16:30:59 +00:00
ICmpObstructionManager.cpp Move parabolic range computation to rangemanager 2022-02-15 20:31:55 +00:00
ICmpObstructionManager.h Move parabolic range computation to rangemanager 2022-02-15 20:31:55 +00:00
ICmpOverlayRenderer.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpOverlayRenderer.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpOwnership.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpOwnership.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpParticleManager.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
ICmpParticleManager.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
ICmpPathfinder.cpp Allow setting the passability class depending on formation members. 2022-05-11 14:47:16 +00:00
ICmpPathfinder.h Removes unused and outdated includes, replaces some includes by forward declarations. 2021-05-15 17:27:01 +00:00
ICmpPlayer.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpPlayer.h Move GenericName, History and Icon from the civ-JSON to cmpIdentity. 2022-02-05 06:24:45 +00:00
ICmpPlayerManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpPlayerManager.h Clean LoadPlayerSettings in Player-helper. 2022-02-18 08:10:13 +00:00
ICmpPosition.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpPosition.h Fix target height computation when launching projectiles. 2021-01-22 18:16:13 +00:00
ICmpProjectileManager.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpProjectileManager.h Let the template define the actor used for the projectile. Also let projectiles have an impact animation (such as an explosion). 2017-12-23 09:27:19 +00:00
ICmpRallyPoint.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpRallyPoint.h Spawn units in rally point direction 2018-02-07 20:58:07 +00:00
ICmpRallyPointRenderer.cpp Removes unused forward declarations of class and struct. 2021-09-08 19:43:01 +00:00
ICmpRallyPointRenderer.h Spawn units in rally point direction 2018-02-07 20:58:07 +00:00
ICmpRangeManager.cpp Move parabolic range computation to rangemanager 2022-02-15 20:31:55 +00:00
ICmpRangeManager.h Move parabolic range computation to rangemanager 2022-02-15 20:31:55 +00:00
ICmpRangeOverlayRenderer.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpRangeOverlayRenderer.h Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpSelectable.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpSelectable.h Diplomacy Colors 2018-02-03 14:17:31 +00:00
ICmpSettlement.cpp # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpSettlement.h # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpSound.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpSound.h Fix units not being able to play sounds when walking and running 2018-02-24 18:13:03 +00:00
ICmpSoundManager.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpSoundManager.h Fix building without precompiled headers. 2020-11-18 11:35:36 +00:00
ICmpTemplateManager.cpp Move GenericName, History and Icon from the civ-JSON to cmpIdentity. 2022-02-05 06:24:45 +00:00
ICmpTemplateManager.h Move GenericName, History and Icon from the civ-JSON to cmpIdentity. 2022-02-05 06:24:45 +00:00
ICmpTerrain.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpTerrain.h Replace hardcoded copies of a C++ simulation constant in JS used to compute the mapsize with a call to a new getter in the C++ interface. 2017-05-31 16:43:57 +00:00
ICmpTerritoryDecayManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpTerritoryDecayManager.h Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells. 2017-10-07 08:42:39 +00:00
ICmpTerritoryInfluence.cpp # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpTerritoryInfluence.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpTerritoryManager.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpTerritoryManager.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpTest.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpTest.h
ICmpTurretHolder.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpTurretHolder.h Fix some C++-style notes from b5df81af76. 2021-01-11 11:26:31 +00:00
ICmpUnitMotion.cpp Allow setting the passability class dynamically. This is needed to improve formation behavior for the release. 2022-04-17 11:06:09 +00:00
ICmpUnitMotion.h Allow setting the passability class dynamically. This is needed to improve formation behavior for the release. 2022-04-17 11:06:09 +00:00
ICmpUnitMotionManager.cpp Implement a Motion Manager around UnitMotion. 2021-03-17 17:04:51 +00:00
ICmpUnitMotionManager.h Moddability for pushing: radius in XML, allow deactivating globally/some templates. 2021-06-02 17:36:32 +00:00
ICmpUnitRenderer.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpUnitRenderer.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ICmpUnknownScript.cpp # Added initial support for players and population counters in new simulation system, plus various infrastructure improvements. 2010-01-22 20:03:14 +00:00
ICmpUnknownScript.h # Added initial support for players and population counters in new simulation system, plus various infrastructure improvements. 2010-01-22 20:03:14 +00:00
ICmpValueModificationManager.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpValueModificationManager.h Allow boolean and u16 modifications for C++ 2020-12-11 14:07:48 +00:00
ICmpVisibility.cpp Fixes macOS warnings after adding final keyword to simulation classes in 3eee3a444d. 2022-03-07 23:04:11 +00:00
ICmpVisibility.h RangeManager: Grid for 2D array, enum cleanups. 2020-06-13 09:05:40 +00:00
ICmpVision.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpVision.h Add support for const methods in components and make those that can be const const. 2017-01-20 02:25:19 +00:00
ICmpVisual.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpVisual.h Implement quality levels for actors & corresponding setting. 2021-04-08 07:22:24 +00:00
ICmpWaterManager.cpp Migrate DEFINE_INTERFACE_METHOD_* to the ScriptFunction wrappers. 2021-05-01 08:01:30 +00:00
ICmpWaterManager.h Replaces UNICODE characters in the code by consistent ASCII characters. 2021-01-15 10:07:36 +00:00