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.
bones_was_here [Wed, 13 Mar 2024 16:10:01 +0000 (02:10 +1000)]
monsters: try to avoid danger
Also makes them avoid falling off platforms and into holes, and try to
find another path, when NOT chasing an enemy.
This makes them more useful for guarding an area, especially on space
maps.
bones_was_here [Tue, 12 Mar 2024 21:26:04 +0000 (07:26 +1000)]
monsters: improve following and wandering behaviour
Makes monsters wander around the player they're following when nearby,
and wander towards the player using the follow update interval when
further away.
This prevents them clustering tightly around the player and increases
their chance of overcoming trivial obstacles.
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.
terencehill [Sat, 10 Feb 2024 14:02:02 +0000 (15:02 +0100)]
Menu: remove useless registries and related code (TempEntities, LinkedEntities, C2S_Protocol) and fix a couple registries not matching the corresponding client/server versions (Buff entry was missing from the RadarIcons and Waypoints registries)
bones_was_here [Mon, 23 Oct 2023 15:30:36 +0000 (01:30 +1000)]
mapinfo: fix and rename noautomaplist flag to donotwant
This flag was ignored in the code paths used on most servers, and its
name and behaviour were not ideal for its intended use, see 7d48e976c8a9b3f80350b2ad41d9feec2797cf76 description which seems clear
that it's for allowing a certain kind of map to be available on the
server but not be included in the usual voting pool.
This updated implementation omits the flagged maps from GUI voting and
prevents them being selected by other GotoNextMap()/GetNextMap() code
paths, unless there aren't enough viable maps in which case they
can still be used as fallbacks.
The flagged maps are always listed in CLI and may be nominated with
`suggestmap` or vcalled with `gotomap` or `nextmap`.
bones_was_here [Fri, 9 Feb 2024 19:28:37 +0000 (05:28 +1000)]
Q3 compat: implement a 1ms fallback traveltime for all movers
This fixes the doors failing to open on q3df map sdc-uk_08 which uses
trigger_multiple -> func_button.speed = -1 -> func_door
Buttons trigger targets at the end of their movement and that one didn't
move at all.
terencehill [Sat, 20 Jan 2024 12:34:35 +0000 (13:34 +0100)]
Fix #2893 "cl_zoomfactor 1 results in division by zero"; also simplify the current_viewzoom check (almost_equals performs redundant checks in this case)
terencehill [Fri, 15 Dec 2023 23:58:25 +0000 (00:58 +0100)]
Apply voted game type on map switch, not on game type vote end so that the "restart" command, if called, properly restarts the map applying the current game type
terencehill [Sat, 11 Nov 2023 17:11:51 +0000 (18:11 +0100)]
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