Skip to content

Feature/trigger void#850

Open
skies912 wants to merge 2 commits into
mainfrom
feature/trigger-void
Open

Feature/trigger void#850
skies912 wants to merge 2 commits into
mainfrom
feature/trigger-void

Conversation

@skies912

Copy link
Copy Markdown
Collaborator

Summary

Introduces trigger_void ent via Claude. It's to replace using trigger_hurt in 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 the target key. Also defines new void-death sound for each player model.

Notes

  • Bottom face of the brush must not touch other solid faces, otherwise it prevents death.
  • We still need to make the actual void-death sounds

skies912 and others added 2 commits June 13, 2026 14:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant