0ad/source
josue ce249f4ef0 Don't recompute the LOS visibility of unchanged entities when rendering
The per-turn visibility update of the range manager runs on MT_Update,
which is broadcast before unit motion and before scripted components
act. LOS changes later in the turn therefore leave regions flagged
dirty during all the frames rendered until the next turn, so the
renderer's once-per-turn GetLosVisibility query fell back to
ComputeLosVisibility for every entity in such regions. That calls into
the scripted Visibility component of every corpse near any fight once
per turn from the render path (#8327), and shows end-of-turn visibility
while positions are still interpolating across the turn (#5876).

Add GetCachedLosVisibility, which trusts the visibility cache for dirty
regions but still recomputes entities whose own state changed since the
last update - so newly spawned entities (corpses, mirages) don't render
hidden until the next turn - and use it for unit rendering and the
minimap. The cached result is consistent with the VisibilityChanged
messages. Simulation and UI callers keep the existing behaviour.

Limiting the scripted visibility calls to the per-turn update was
suggested by Itms and Vantha in #8327.
2026-06-12 18:09:56 +02:00
..
collada Fix some includes all over the place 2025-08-14 20:15:30 +02:00
dapinterface Remove ScriptTypes and ScriptExtraHeaders headers 2025-09-14 13:17:18 +02:00
graphics Don't recompute the LOS visibility of unchanged entities when rendering 2026-06-12 18:09:56 +02:00
gui Unwrap SDL_Event 2026-05-20 19:44:52 +02:00
i18n Reduces boost usage for strings 2025-10-16 09:17:05 +02:00
lib Remove unix_ExecutablePathname 2026-06-08 20:59:45 +02:00
lobby Remove IXmppClient.h 2026-04-14 19:38:05 +02:00
maths Replace M_PI with C++ numbers 2026-06-04 20:29:48 +02:00
network Disconnect before deleting the session 2026-05-17 17:20:37 +02:00
pch Compute actual size of GUI objects lazily 2026-04-12 00:17:02 +02:00
ps Uses SwapChain instead of direct Device calls 2026-06-08 18:27:06 +02:00
renderer Decouples acquire/present from SubmitScheduler 2026-06-08 18:27:10 +02:00
rlinterface Use cpp-httplib instead of mongoose 2026-01-24 10:45:48 +01:00
scriptinterface Cleanup wposix header and source 2026-06-08 19:52:53 +02:00
simulation2 Don't recompute the LOS visibility of unchanged entities when rendering 2026-06-12 18:09:56 +02:00
soundmanager Replace M_PI with C++ numbers 2026-06-04 20:29:48 +02:00
third_party Removes dummy GL functions as replaced by core 2026-04-25 17:47:06 +02:00
tools Uses SwapChain instead of direct Device calls 2026-06-08 18:27:06 +02:00
CxxTestRunner.tpl Use return instead of exit in testrunner 2025-10-15 18:17:24 +02:00
main.cpp Unwrap SDL_Event 2026-05-20 19:44:52 +02:00
test_setup.cpp Remove ScriptContext::CreateContext 2026-01-24 12:03:05 +01:00