Bug Tracker – Bug 1071

Don't set spectator flags on dead player objects

Last modified: 2019-01-16 08:27:48 UTC
Bug 1071 - Don't set spectator flags on dead player objects
Summary: Don't set spectator flags on dead player objects
Alias: None
Product: Odamex
Classification: Unclassified
Component: Server & Client (show other bugs)
Version: 0.7.x (Old)
Hardware: All All
: P1 trivial
Assignee: Odamex Bug Reporter
Depends on:
Reported: 2014-04-18 20:29 UTC by Kyle
Modified: 2019-01-16 08:27 UTC (History)
3 users (show)

See Also:


don't set spectator flags on a dead player object (3.92 KB, patch)
2014-04-18 20:30 UTC, Kyle
Details | Diff
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle 2014-04-18 20:29:05 UTC
Currently in Odamex, when a player spectates, their associated mobj is made invisible.

There is no need to remove a corpse when a player spectates, and in the survival mode that I'm making, where players are forced to spectate if they run out of lives, this behavior causes the player to just disappear when they die on their last life.

The following patch works around this by adding a "deadspectator" flag that is set on the player when they spectate while dead. This alters the behavior of the respawning code, to make it silently respawn the spectator in the same position as their corpse, leaving it behind.
Comment 1 Kyle 2014-04-18 20:30:40 UTC
Created attachment 494 [details]
don't set spectator flags on a dead player object
Comment 2 Mike Lightner 2014-05-14 20:58:33 UTC
r4867 applies this patch.
Comment 3 HeX_Vulture 2016-09-19 22:24:01 UTC
Is this implemented as intended?
Comment 4 Ralph Vickers 2019-01-06 02:55:14 UTC
This patch has been in since 2014, we don't seem to have any issues, and the original reporter never followed up. Marking fixed.
Comment 5 Kyle 2019-01-10 15:55:01 UTC
This remains unresolved. The changes my patch made were commented out in commit 0fe6548 and were never reenabled.
Comment 6 Maëllig Desmottes 2019-01-14 08:16:09 UTC
Indeed, I also noticed these lines are commented out. I guess it'll be reenabled jut before the 0.8 release...

I'd believe those were reserved for the future survival mode, but other than that, was it used somewhere else to fix any specific behaviour ?
Comment 7 Kyle 2019-01-15 18:04:29 UTC
Outside of survival, the deadspectator flag prevents a player corpse from disappearing if they spectate while dead, prior to respawning, which is a fairly minor issue overall. In survival mode, though, the deadspectator flag prevents some pretty jarring behavior, where players would just disappear the instant they lost their last life, without even going through the death animation. If I recall correctly, the flag also has the additional purpose of distinguishing between normal spectators and players forced to spectate upon death. The latter group being respawned automatically when a new round starts up.
Comment 8 Maëllig Desmottes 2019-01-16 08:27:48 UTC
So yep, according to Kyle's description of the issue, there was seriously no reason to comment those lines out.