bones_was_here [Fri, 31 May 2024 06:42:44 +0000 (16:42 +1000)]
Q1BSP: use engine default for gl_max_lightmapsize (currently 512)
This more than doubles average FPS and improves worst-case frametimes on
many Q1BSP maps, and has no effect on Xonotic / Q3BSP maps (as tested
with: weapon and powerup dlights in timedemo, animated realtime world
lights both with and without shadows in static tests).
In old versions of DP (div0-stable), 512 1024 and 4096 all had equally
bad perf. In current DP the perf is far better but only when the right
setting is used. For most hardware, old and new, 512 seems to be the
sweet spot. Lower settings are somewhat worse, higher settings are MUCH
worse.
terencehill [Fri, 24 May 2024 20:05:02 +0000 (20:05 +0000)]
Survival and CA: when the game ends put players who joined after last round start back to spectators. CA: when the game ends put players who switched team during the last round back to previous team.
Forced team switch works even if player would be moved to a larger team and if g_balance_teams and g_balance_teams_prevent_imbalance are enabled
terencehill [Fri, 24 May 2024 18:12:51 +0000 (18:12 +0000)]
Merge branch 'terencehill/damagetext_stuff' into 'master'
Fix damagetext not stopping damage accumulation after enemy's death and optimize damagetext code when player is hit by multiple projectiles at the same time
See merge request xonotic/xonotic-data.pk3dir!1277
terencehill [Fri, 24 May 2024 17:18:44 +0000 (19:18 +0200)]
Autoscreenshot: allow screenshots to be taken for old clients connected to new servers too (screenshots are taken in the old way, without hiding other UI parts but with 0.1s delay instead of 0.8s)
Optimize damagetext code by spawning only one damagetext entity when player is hit by multiple projectiles at the same time, e.g. shotgun. It reduces CPU usage, networked data and precision errors
vid_resizable was fixed and defaults to enabled in DP, vid_bitsperpixel
isn't configurable and setting it currently causes a warn (almost all
hardware supports only 24bpp).
Clean up droptofloor() macro hacks and clarify naming
It wasn't clear at call sites that this had been changed to a delayed
function (in SVQC only), and that the return value was no longer
available. We can just use different names for the QC implementation,
with different names for delayed and direct calls, and leave the
original name for calling the builtin if required. The builtin's wrapper
macro for changing the self global to a parameter is retained and it now
works the same in SVQC and CSQC.
bones_was_here [Thu, 21 Mar 2024 06:40:45 +0000 (16:40 +1000)]
q3compat: reduce entity field allocation
These fields are only read during worldspawn on Q3 maps, we don't need
them on every entity.
I retained .gametype and .not_gametype as I expect we'll want to
implement these for Xonotic mappers, and we're already using the
.gametype field elsewhere.
Will now support edge cases where the mapper used \ as the .music path
separator instead of the canonical /
bones_was_here [Wed, 20 Mar 2024 08:51:30 +0000 (18:51 +1000)]
Support Mine Layer on Q3TA/QL maps
In !849 I changed weapon_prox_launcher to spawn the Mortar, in hindsight
this was a mistake. Some maps have both weapons, and although the
Mortar is more popular, some players really like the Mine Layer, so
let's just go with what the mapper chose. Server admins can easily
change items with .ent files if they want.
Nades code: don't use booleans as array indexes for m_projectile, optimize spawn_held_nade by reducing REGISTRY_GET calls, optimize Nade_FromProjectile by removing a for loop
drawstring_aspect: fix wrong horizontal string alignment sometimes due to r_font_size_snapping 4; document macro helper. Also don't display timer subtext bold to mitigate drawstring_aspect bug
While at it I wrapped a couple very long lines in timer panel code
Use correct titles for a few scoreboard fields (now scoreboard can better handle longer titles); use proper field and score names for destroyed generators (Onslaught)
Scoreboard: limit width of field titles and show too long titles compressed. Max width can be configured via hud_panel_scoreboard_table_fieldtitle_maxwidth
terencehill [Sat, 30 Mar 2024 22:17:28 +0000 (23:17 +0100)]
Optimize WinningConditionHelper: avoid calling strcpy if strings are the same, reduce number of strcat calls. Also remove redundant ^7 in 3 messages of GameCommand_moveplayer
bones_was_here [Wed, 20 Mar 2024 23:58:48 +0000 (09:58 +1000)]
mapinfo: minor fixes: q3compat and CSQC warning removal
Fixes Q3/QL maps that support 2v2 and duel also getting CA enabled.
The "tournament" string never matched, it's "tourney" in Q3 and "duel"
in QL, "tournament" is only used in the Q3 .gametype entity field.
terencehill [Sun, 24 Mar 2024 21:50:44 +0000 (22:50 +0100)]
Use the correct function to get the active gametype in a LOG_FATALF call
MapInfo_Type_ToString(MapInfo_CurrentGametype()) returns the current gametype that can be changed during the game by the gametype command; GetGametype() returns the active gametype