Feature/trigger void#850
Open
skies912 wants to merge 2 commits into
Open
Conversation
A trigger_hurt variant inspired by Quake 3. Stepping onto the top face pulls the player into the void: the HUD is suppressed and the camera locks at the entry point in third person, tracking the player as they fall. Reaching the bottom face is an instant, unavoidable kill (gibs) that bypasses armor and god mode. On a void death nothing is dropped at the death location: powerups are removed outright, the carried CTF flag is returned to base (with a single combined message), carried techs are respawned into their pool, and the weapon is not tossed. Pedestal powerup respawns are unaffected. The "teleport" spawn flag turns the trigger into a non-lethal warp instead: to a specific destination when a "target" key is set (e.g. a misc_teleporter_dest), otherwise to a random spawn point. Implementation notes: - in_void state is transmitted to the client via a new STAT_VOID stat; the locked tracking camera lives in cgame (Cg_UpdateVoidCamera). - A void_touch_time stamp clears a stale in_void if the player leaves the brush without reaching the bottom; in_void is also cleared in G_ClientDie to cover death by other means mid-fall. - Bottom-face detection uses the player's bbox feet vs the brush floor, so it is independent of brush depth. Requires a models/<player_model>/death_void.wav asset for the death sound; the precache fails silently until one is provided. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
STAT_VOID was inserted alphabetically between STAT_TIME and STAT_WEAPON, which shifted STAT_WEAPON's index. A new client talking to an older server then read the server's STAT_WEAPON value as STAT_VOID, enabling the void camera on spawn (the weapon tag is always non-zero). Moving the new stat to the end keeps all existing indices stable; older servers simply never populate the trailing slot, so it defaults to 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces
trigger_voident via Claude. It's to replace usingtrigger_hurtin space maps or maps with death-pits. When the player falls into the top face, their POV switches to third person an cam is locked at entry (cam of shame) while they fall to their death when they hit the bottom face. Has single spawnflag that enables teleportation instead of death to a random DM respawn OR to a defined tele_dest pad via thetargetkey. Also defines new void-death sound for each player model.Notes