MantisBT - Zandronum
View Issue Details
0001502Zandronum[All Projects] Suggestionpublic2013-09-12 20:212014-06-15 16:04
arkore 
 
normalfeaturealways
acknowledgedopen 
1.2 
 
0001502: Force Player to Spectator after self-death when sv_norespawn is true. (Duel)
When player dies by his own hands (rather the hands of the opponent), then "fraglimit 1" has no effect to determine a winner of the match.

When sv_norespawn is true, can we force the player to spectator when player kills himself? Perhaps check for event "player dies" and check "does player have -1 frags" ?

Video:'http://www.youtube.com/watch?v=GxRy_TaWR9U [^]'
Start a Duel server, add a bot, and put yourself on god mode.

Let bot walk up close to you; bot fires rocket launcher at you enough times it will damage itself, eventually killing itself.

Bot stays dead. Does not go to spectator, and rejoin.
I noticed that even though "sv_losefrag" is false, the player still gets -1 frags from killing itself. So, it seems "sv_losefrag" only applies to when you die by the hands of your opponent.
No tags attached.
related to 0001612acknowledged  Force players to spectate when they die 
Issue History
2013-09-12 20:21arkoreNew Issue
2013-09-12 21:04arkoreNote Added: 0007181
2013-09-12 21:05arkoreNote Edited: 0007181bug_revision_view_page.php?bugnote_id=7181#r4023
2013-09-13 01:20arkoreNote Added: 0007182
2014-06-14 17:56WatermelonNote Added: 0009337
2014-06-14 17:56WatermelonStatusnew => acknowledged
2014-06-15 16:04WatermelonRelationship addedrelated to 0001612

Notes
(0007181)
arkore   
2013-09-12 21:04   
(edited on: 2013-09-12 21:05)
I noticed in the Skulltag code, some instances where the programming is such: "if (player->ulLivesLeft == 0) { PLAYER_SetSpectator( player, false, true ); ... ... }"

If that same logic is being used in cases (with Frags?) like this (Duel + Self kill), could you maybe change it to be: "if (player->ulLivesLeft <= 0) { ... }" so that "<=" it catches a player's frag count of -1 and forces them to spectator?

I can't even do ACS for this functionality, because PLAYER_SetSpectator() is not defined in ACS, even though I see PLAYER_SetSpectator() being used in Skulltag's code. See screenshot:'http://d.pr/i/apqR [^]'

(0007182)
arkore   
2013-09-13 01:20   
Okay, I found a work around for this.

script 3 DEATH
{
    if (PlayerFrags() == -1) {
        delay(175); // Delay 5 seconds.
        KickFromGame(PlayerNumber(), "DEAD.");
    }
}

Not ideal, but works. I'd prefer to use PLAYER_SetSpectator, or at least prefer instead that the Zandronum engine does it itself by default.
(0009337)
Watermelon   
2014-06-14 17:56   
There's something I'm adding in the future that may address this