Scrolling up and down might not do anything (not even a little bit) not
only if the max pos is 0, but also if it's smaller than 1. It depends on
the parent's position and whether or how the rendered rounds positions
of the scroll content. E.g. text positions are rounded up.
It's preferable to hide the scrollbar if it's between 0 and 1, cutting of
1 single pixel in unfortunate cases is better than rendering a useless
scrollbar.
Needs bitwise AND instead of OR, else irrespective of filemode requested
all permissions are given in CreateDirectories.
Fixes: 43e7dbc6da
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The issue was introduced by fd976456d7 and made appearant by
67c96094f0.
If a cinema path was played right at the start of a game, then the
smooth LOS rendering option was disabled before `InterpolateLOS` was
called for the first time, so in turn when `ConstructTextures` was
called for the first time, it didn't fill the `m_SmoothFrameBuffers`
and `m_SmoothTextures`. And when smooth LOS was enabled again (by the
cinema path ending), `ConstructTexture` wasn't called again by
`RecomputeTexture` since `m_Texture` already existed. This means that
the `m_SmoothTextures` and `m_SmoothFramebuffers` remained unfilled,
which then caused a crash when they were accessed and used in
`InterpolateLOS`.
Since creating the shader and filling `m_SmoothTextures` and
m_SmoothFramebuffer` isn't expensive, the simplest solution is to always
do that no matter if smooth LOS is enabled or not.
This allows to create nonextising relative paths, this is useful for
example for `HOME=tmp ./binaries/system/pyrogenesis` running pyrogenesis
with a default config.
Fixes: 43e7dbc6da
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This patch fixes the previously broken implementation of the timescale
property of cinema paths, now cinema paths with timescale 0.5, for
example, play twice as fast.
Unlike the comment stated, negative timescales weren't actually
supported, which is now enforced.
For demonstration, the timescale of the demo map's path is changed to
0.85.
There is no point in calling `CCmpCinemaManager::StartPlayingQueue`
again after deserializing, `m_WasMapRevealed` is (de)serialized anyway
and that call always overwrote it to false, which caused OOS.
`UpdateActivePath`, which is called each frame during rendering, mustn't
call `StopPlayingQueue`, since that impacts the serialized simulation
state.
And it is safe to assume `!m_PathQueue.empty()` if
`m_IsPlayingPathQueue`
Only send the CinemaQueueEnded message at the end of
`CCmpCinemaManager::StopPlayingQueue`, after resetting everything.
The other components would expect the queue to actually have ended
(`CCmpCinemaManager::IsPlayingQueue` to be returning false) when
receiving the message.
A distribution is statefull it might store some unused entropy so that
the rng might be called less ofthen.
So this commit might increase the object size and improve performance.
After #7164, entities in the ActorViewer are loaded through the
preview filter, which disables shadows by design. As a result, the
shadow toggle no longer has any visible effect.
Adds a dedicated viewer.xml template so the ActorViewer no longer
inherits the preview filter's shadow behaviour, keeping preview.xml
untouched for the entities that legitimately need shadows off.
Refs #7164
Reported by: Vladislav
Territory influence weights could cause other players' territories to
overlap with buildings, leading to incorrect territory ownership and
buildings decaying even when they should be within their own territory.
This fix ensures that all tiles occupied by a building's footprint are
always owned by the building's owner, regardless of influence weights
from nearby structures.
Obstruction cluster are found in walls. Since position of walls would never change, that erroneous code path was probably never executed, hence it never caused any observable problems. Fixing this anyway in case it would be relevant in future.
It was implemented on Windows only. It doesn't really contain a useful
for us information which can not be obtained by diagnostic tools like
dxdiag when needed.
The filter was rarely used. The implementation was overly complex and
might have filtered out strings that should have been printed.
Tags like "FILES|" have been removed.
For the loader a macro `LOADER_LOG` has been introduced.
Mods may dynamically request icons
(e.g., [icon=\"emblem_${civ}\"], [icon=\"icon_${res}\"]) that
don't exist when another mod introduced the new civ or resource
but hasn't added that icon.
This results in excessive error log spam during normal gameplay.
We need to track models to update in a single place. SceneRenderer in
that case. It allows us to make ModelVertexRenderer implementations more
straightforward.