Don't execute client config on dedicated server. Also move some cvars to the correct config files and remove the "untouchable" cvar cl_warpzone_usetrace
terencehill [Mon, 6 May 2024 17:17:34 +0000 (19:17 +0200)]
Fix help messages (help-xonotic.cfg) not loaded at startup (dedicated server).
They were wrongly formatted too because help_cfg_prefix didn't exist when they were defined (due to help-xonotic.cfg being executed before help.cfg) so I had to fix it too.
It gets rid of this error:
Unknown command "if_dedicated"
that happened because 'if_dedicated exec help-xonotic.cfg' was executed before if_dedicated definition (in commands.cfg)
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
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
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
terencehill [Sat, 16 Mar 2024 01:52:31 +0000 (02:52 +0100)]
Revert "Don't allow negative values for the y component of the shot origin offset because the gun can't be aligned to the left by default. Thanks to this change it's possible to restore precision of the y and z components back to 0.25"
because player weapon alignment (cl_gunalign) is applied before compression, thus the y component can be negative.
This adds a feature: if the flag is dropped in a place its bbox doesn't
fit, the player's bbox (crouched or full size) is used as a fallback.
This prevents it getting stuck so physics can still move it, and it will
be expanded to full size if it's moved to a place where it does fit.
This MR adds this to flags only, because they already had half the code.
I'll add it to other big ents that players can drop (keys, balls,
powerups) in another MR.
In some cases this isn't enough to fix a bad placement, in rare cases it
can cause a bad placement because it doesn't consider the brushwork
near the item.
It's replaced by smart nudging (DP_QC_NUDGEOUTOFSOLID).
Adds a Small 48x48x48 item bbox which is used for 5 and 25 health and
armor items. This is the biggest horizontal size that fits in the 25h
alcove on finalrage.
Changes powerup, buff and mega pickups to all have the same height.
This will make it cheaper to network item bboxes to CSQC.
Improve visibility of warnings, related cleanup and fixes
The reason for strcat1n is now fixed properly by darkplaces@b0abeba2 and a986d478
Double printing of backtraces with `developer 1` is fixed.
Failure to print fatal messages with `developer 1` is fixed.
Made the pipeline's `sv_cmd runtest` accept results prefixed with (eg)
"[::SVQC::INFO]" (as long as they end with exactly "All tests OK"), also
fixed incorrect hash being printed in green and fixed "PASS: unbound
variable" error.
Add engine extension checks at VM startup and a nudgeoutofsolid fallback
This allows printing proper messages immediately rather than crashing
later or silently failing to download maps or support player IDs, which
may prevent broken 3rd party packages.
Implements a fallback to WarpZoneLib_MoveOutOfSolid() for when the new
DP_QC_NUDGEOUTOFSOLID isn't available. Adds a "wasn't-stuck" `-1`
result to WarpZoneLib_MoveOutOfSolid(), to prevent warning spam in the
fallback path.
items: Apply vertical offset on Q3 maps to match Q3 bbox floor height
The lack of this caused high-placed items to be stuck in a "ceiling"
brush in a few cases (problematic for droptofloor). It also meant
suspended items were too high, causing cases where a jump pad sent the
player slightly under the item, with nothing they could do to reach it.