Also DynamicArena causes an assertion when there are too many GUI
elements. LinearAllocator consumes similar amount of memory in total
but reduces a chance to get the assertion.
A command for a huge turn made the server resize saved commands and
clients their command queues to that size, running out of memory.
Reject turns below 0 or beyond MAX_COMMAND_TURN_FACTOR * COMMAND_DELAY_MP
ahead of the ready turn, before relaying, and kick the sender.
This allows the same user to keep the buddy list across clients and
config resets. At the same time this allows for per lobby buddy lists
which is needed as the same nickname may refer to different people.
Use lower case comparison for buddy names. This is in line with the idea
of local part of jid should be seen as normalized nick and is used
server-side to compare user names.
The migration is kept simple. I.e. only attempted if the roster is
empty and the config indicates no migration was done before.
Fixes: #6824
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
It wasn't represeting maximumum or average CPU frequency. Just a
frequency calculated at the time of HW report. Also it was
working only for Windows and x86-64.
NUMA is needed for multiprocessors systems like server ones. We don't
target such platform. OS shouldn't handle that for us.
Also we had NUMA support only for Windows.
Used MAX_FAILED_MOVEMENTS (a fixed constant) instead of
m_FailedMovements, making the "every N failures" clause always
false at compile time. Alternation only ever fired once per
failure streak instead of periodically as intended.
Introduced in 70ec781.
Audio files referenced directly in GUI/simulation JS strings
(e.g. g_FlareSound, soundfile entries, Ambient tracks) were not
tracked. Add a js_audio_regex scan alongside the existing sprite
scan for both gui/ and simulation/ JS files.
Several categories of session UI textures were falsely reported as
unused because checkrefs only parsed XML/JSON data files and missed
texture references buried in JavaScript runtime logic.
Entity templates:
- Parse <Identity><Rank> to track session/icons/ranks/{rank}.png
- Parse <Minimap><Icon> to track session/icons/minimap/{icon}.png
Data-driven JSON files:
- Add add_resources(): scan simulation/data/resources/*.json for
resource 'code' fields -> session/icons/resources/{code}.png
- Add add_status_effects(): scan simulation/data/status_effects/*.json
for 'icon' fields -> session/icons/status_effects/{icon}.png
Technology files:
- In add_techs(): detect phase_*.json base techs (e.g. phase_city.json)
and add session/panel_phase_emblems_{phase}.png as a dep
JS scanning (extended):
- Extend the GUI JS literal-path regex to also recognise:
- 'texture:' sprite modifier prefix
- full 'art/textures/ui/...' literal paths
- bare 'session/...' paths used as runtime sprite components
- Also scan simulation/components, simulation/helpers and globalscripts
JS files (registered as roots) with the same regex so textures
referenced from simulation code are tracked
- Add _add_unit_action_icon_deps(): parse unit_actions.js for
'icon': 'X.png' properties -> session/icons/X
- Add _add_status_bar_icon_deps(): parse StatusBars.js AddBar() calls
for bar type strings -> session/icons/{type}_bg/fg.png
- Add _add_stance_icon_deps(): parse g_Stances in UnitAI.js for
selectable stance keys -> session/icons/stances/{stance}.png
Two sources of false-positive unused-file warnings:
1. Literal stretched:/cropped: sprite paths in GUI JS files (e.g.
bell_level0.png, cancel.png, minimap flare textures) were never
tracked because JS is not parsed for texture deps. Add a regex scan
of gui/*.js for complete literal sprite paths ending in a known
texture extension, filtering out dynamic string concatenations
(+ / ${...}).
2. Per-civ background circle textures (bkg/background_circle_<code>.png)
are constructed at runtime in MiniMapPanel.js via a template literal
using the player civ code. Add a dep from each civ JSON to its
corresponding background circle texture.
Icons defined in setup XML files (e.g. lobby/icons/public.xml) have
sprite attributes that reference UI textures, but the setup parser only
handled <scrollbar>, <tooltip> and <color> tags. This caused textures
like lobby/public.png to be falsely reported as unused by -u.
Some engine assets are loaded directly by C++ renderer code with no
corresponding reference in any XML template, actor, or data file that
checkrefs.py can statically trace. Files in mod layers that override
these paths were incorrectly reported as unused.
Introduce source/tools/entity/cpp_hardcoded_assets.json to maintain
the list of such VFS paths alongside their C++ source location and a
description. checkrefs.py reads this JSON via add_cpp_hardcoded_assets()
and marks every matching file in all loaded mod layers as a known-used
root, so mod overrides are no longer flagged.
Initial entries:
art/textures/terrain/types/water/coastalWave.png
art/textures/terrain/types/water/foam.png
Both are loaded unconditionally by WaterManager::LoadWaterTextures().
Fixes 2 false-positive unused-file warnings for mod/ water textures.
TerrainTextureManager::LoadAlphaMap() hardcodes 14 PNG filenames and
loads them from art/textures/terrain/alphamaps/<type>/ where <type>
comes from the terrain XML <alphamap> element (defaulting to
"standard"). checkrefs add_terrains() parsed <textures> and
<material> but never read <alphamap> and had no knowledge of the
filenames loaded by C++.
Changes:
- Read <alphamap> from each terrain XML (default "standard") and
add all 14 hardcoded PNG filenames as deps of the terrain file.
- Always register the "standard" set as roots since C++ loads it
unconditionally as a fallback, even when no terrain specifies it.
The filenames are kept in sync with the fnames[] array in
source/graphics/TerrainTextureManager.cpp.
Fixes 14 false-positive unused-file warnings for the standard/
alphamap set.
The entity parser handled LineTexture/LineTextureMask under
Heal/RangeOverlay and MainTexture/MainTextureMask under
Selectable/Overlay/Texture, but had no handling for the
Selectable/Overlay/Outline/{LineTexture,LineTextureMask} path
used by the outline selection ring renderer.
These textures are referenced in e.g. mixins/trading_post.xml and
any other template that sets a custom outline selection style.
Fixes 2 false-positive unused-file warnings:
art/textures/selection/outline_border_02.png
art/textures/selection/outline_border_02_mask.png
The sprites XML parser iterated sprite.attrib.items() — the attributes
of the <sprite> tag itself — and checked if el == "image". Since
<image texture="..."> elements are children of <sprite>, not its
attributes, this check could never be true. No texture dependency was
ever extracted from any sprites definition file.
Fix by iterating sprite.findall("image") and sprite.findall("effect")
to correctly traverse child elements, and read attributes from those
elements directly.
Fixes 99 false-positive unused-file warnings across global/border/,
global/button/, global/modern/, global/watermark/, loading/,
pregame/, session/, and tipdisplay/ UI texture directories.
checkrefs.py only traced music files referenced in civ JSON Music[]
arrays. Two additional sources were missed:
- gui/common/music.js DEFAULT_*_TRACKS prototype arrays define fallback
playlists used when a civ has no music entries. All .ogg filenames
found in that file are now added as deps of the music.js root.
- simulation/data/cheats/*.json files can reference audio files via
Data.DefaultParameter (e.g. retroMe.json -> 0_8Bit_Bonus_Track.ogg).
These are now tracked as deps of each cheat root.
Fixes 10 false-positive unused-file warnings.
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.