#36 Buggy teleport fog and sounds on player respawns


The teleport fog and sound effect (which were
originally intended to appear every time a player
respawns) are dependent on: A) the angle setting of the
used "Player # Start" / "Deathmatch Start" mapthing in
a WAD file and B) the distance between the spot where
the player previously died and the used respawn spot.

A fix for the first problem (spawning the fog mobj at
wrong coordinates, which are usually far beyond level
boundaries) has already been added after the 2.2.5
release, but I think that there should be an option to
accurately emulate the behaviour from the original
Watcom compiled binaries supplied by id Software.

The second problem is that the players do not always
hear their own respawn sound if they died too far way
from the spawn spot. This happens because
players[displayplayer].mo, which S_StartSoundAtVolume
passes as the listener mobj to S_AdjustSoundParams, is
still pointing to the dead body mobj when the
S_StartSound call is made in G_CheckSpot.

Included as an attachment is a patch that will add a
compatibility variable (comp_plrspawnfog) for toggling
the already implemented fix for the 1st problem, plus
some code for emulating the Watcom behaviour for
mthing->angle values >= 180. It will also add a fix for
the 2nd problem and a compatibility variable
(comp_plrspawnsound) for toggling it.

It might seem to be better to just combine these under
one compatibility toggle (called comp_playerspawns, for
example) as we are already a bit short on the space
reserved for comp_* variables in demo/savegame headers,
but there are some deathmatch players there who would
prefer to keep the 180 spawns the way they are in
doom2.exe but who do not like not being able to hear
their own spawns sometimes. Some of them even say that
this fix should just always be enabled. However, I
think that in compatibility mode the players should see
and hear the exact same things they do in v1.9,
especially if PrBoom becomes netplay-compatible with
v1.9 some day.

I am not exactly sure about the switch/case part while
emulating doom2.exe behaviour. It might be possible to
write much shorter "generic" code for that which will
handle every angle correctly. I don't expect you to
necessarily use this patch verbatim, but whatever you
do, it would at least be really nice to see fully 100%
working spawns in PrBoom 2.2.6 with a toggle to
deliberately break the ones with angle==180.


  • Colin Phipps

    Colin Phipps - 2004-10-03
    • labels: 103843 -->
    • milestone: 337889 -->
  • Colin Phipps

    Colin Phipps - 2004-10-03

    Logged In: YES

    The case stuff and angles bit is good, although some are the
    wrong way around. My patch for 2.2.6 has the right data.
    Something like this will do for 2.3.2.

  • Florian Schulze

    Florian Schulze - 2006-07-24
    • assigned_to: nobody --> cph

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks