Zandronum Chat @
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001814Zandronum[All Projects] Suggestionpublic2014-06-04 05:132017-05-17 20:54
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version3.0-beta 
Target Version3.0Fixed in Version3.0 
Summary0001814: sv_forcerespawn improvement/upgrade
DescriptionThere should be an option to force player respawns after a certain time. Currently this is just a boolean variable: if off players can remain dead forever, and if on players are immediately spawned back into the map.

Often you want the dead player not to be immediately forced back into the game (example: abusing this feature by spamming bfg constantly over forced respawn points, or in general just being able to gather your breathe before re-entering the game); however, you don't want them to have the ability to remain dead forever either (example: duel game with a time limit). Making this variable have a configurable time to it would be a great improvement.
Attached Files

- Relationships
has duplicate 0002239closed Timed Force Respawn 

-  Notes
User avatar (0008878)
Watermelon (developer)
2014-06-07 20:42 [^]

Can someone please evaluate if this was the right thing? So far it's working just right on my end, but maybe someone can investigate the reason bSpawnTelefragged was used.

This also makes the ZACOMPATFLAG useless if this is approved, and can be taken out.
User avatar (0008889)
Dusk (developer)
2014-06-07 22:54

On face value it looks like it allows instant respawn if the player was spawn telefragged and your patch does not preserve this behavior.

The Printf() line for the out-of-bounds where it resets itself back to TICRATE/2 IMO. No other CVar that I know of prints it like this. And what do if it becomes gargantually huge? :P

Also, lines 771-774 could be collapsed to one with use of the ternary operator IMO. And the padding style is also off.
User avatar (0008908)
Torr Samaho (administrator)
2014-06-08 10:33

In addition to what Dusk already said (drop the Printf), I think we should keep compat_instantrespawn for compatibility purposes.

Then, the change in AActor::Die can be simplified to changing

            if ( dmflags & DF_FORCE_RESPAWN )
                player->respawn_time += TICRATE/2;


            if ( dmflags & DF_FORCE_RESPAWN )
                player->respawn_time += sv_forcerespawntics - TICRATE;

This simplification combined with changing the default of sv_forcerespawntics to TICRATE*3/2 also fixes the problem that your patch changes the old default behavior: Your patch reduced the default value in case DF_FORCE_RESPAWN is true from TICRATE*3/2 to TICRATE/2 and increased it from TICRATE to TICRATE*3/2 in case DF_FORCE_RESPAWN is false.
User avatar (0008930)
Watermelon (developer)
2014-06-08 18:14

I changed the printf, it's gone

When I change the function to have this:

// [RH] Force a delay between death and respawn
        if ((( zacompatflags & ZACOMPATF_INSTANTRESPAWN ) == false ) ||
            ( player->bSpawnTelefragged ))
            player->respawn_time = level.time + TICRATE;

            // [BC] Don't respawn quite so fast on forced respawn. It sounds weird when your
            // scream isn't completed.
            // [CK] If desired, we can use our own custom respawn time with force respawn
            if ( dmflags & DF_FORCE_RESPAWN )
                player->respawn_time += sv_forcerespawntics - TICRATE;

Now I can't achieve the ticket authors request of being able to spawn whenever, yet force respawning. It makes me wait until sv_forcerespawntics, where I believe he wants it.

I'll try to figure this out and see what solution I can come up with. I have an idea.
User avatar (0010397)
Watermelon (developer)
2014-10-09 00:04

Will check into this after completing some other tickets
User avatar (0013992)
Ru5tK1ng (updater)
2015-12-15 00:29

Currently there is a wad floating around unofficially that duplicates this forced spawn timer behavior. However, it relies on the use of console command to spawn the player and since console command will eventually be removed, the wad will be useless in the future. If native support isn't possible at this time, then perhaps some sort of ACS function could be introduced so that a scripting solution can still be utilized.
User avatar (0015643)
Ru5tK1ng (updater)
2016-09-16 03:56
edited on: 2016-09-19 03:24

So I decided to take a shot at this: [^]

User avatar (0017565)
Torr Samaho (administrator)
2017-05-07 10:14

I left two comments in the pull request. Please have a look.
User avatar (0017608)
Ru5tK1ng (updater)
2017-05-08 18:30

Updated pullrequest based off your comments.
User avatar (0017632)
Torr Samaho (administrator)
2017-05-13 10:04
edited on: 2017-05-13 10:05

Thanks for the changes! I added your updated patch.

User avatar (0017702)
Combinebobnt (reporter)
2017-05-17 02:42

tested in build whatever rust gave me

everything seemed to work fine. I couldnt break it with negative numbers or anything retarded, all defaulted to 0. No decimals accepted but I don't think that matters much.
User avatar (0017703)
Ru5tK1ng (updater)
2017-05-17 03:11

Thanks for testing.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: Combinebobnt Ru5tK1ng Decay Razgriz The Toxic Avenger Marcaek Hypnotoad Argentum JKist3 FascistCat
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-06-04 05:13 JKist3 New Issue
2014-06-07 18:43 Watermelon Assigned To => Watermelon
2014-06-07 18:43 Watermelon Status new => assigned
2014-06-07 20:00 Watermelon Assigned To Watermelon =>
2014-06-07 20:00 Watermelon Status assigned => feedback
2014-06-07 20:41 Watermelon Assigned To => Watermelon
2014-06-07 20:41 Watermelon Status feedback => assigned
2014-06-07 20:42 Watermelon Note Added: 0008878
2014-06-07 20:42 Watermelon Status assigned => needs review
2014-06-07 22:54 Dusk Note Added: 0008889
2014-06-08 00:28 Watermelon Status needs review => assigned
2014-06-08 10:33 Torr Samaho Note Added: 0008908
2014-06-08 10:34 Torr Samaho Status assigned => feedback
2014-06-08 18:14 Watermelon Note Added: 0008930
2014-06-08 18:14 Watermelon Status feedback => assigned
2014-10-09 00:04 Watermelon Note Added: 0010397
2014-10-09 00:04 Watermelon Assigned To Watermelon =>
2014-10-09 00:04 Watermelon Status assigned => new
2015-05-19 01:22 Dusk Relationship added has duplicate 0002239
2015-12-15 00:29 Ru5tK1ng Note Added: 0013992
2016-09-16 03:56 Ru5tK1ng Note Added: 0015643
2016-09-16 03:56 Ru5tK1ng Status new => needs review
2016-09-19 03:24 Ru5tK1ng Note Edited: 0015643 View Revisions
2017-05-07 10:14 Torr Samaho Note Added: 0017565
2017-05-07 10:14 Torr Samaho Status needs review => feedback
2017-05-08 18:30 Ru5tK1ng Note Added: 0017608
2017-05-13 10:04 Torr Samaho Note Added: 0017632
2017-05-13 10:04 Torr Samaho Status feedback => needs testing
2017-05-13 10:04 Torr Samaho Target Version => 3.0
2017-05-13 10:04 Torr Samaho Note Edited: 0017632
2017-05-13 10:05 Torr Samaho Note Edited: 0017632 View Revisions
2017-05-13 10:05 Torr Samaho Note Revision Dropped: 17632: 0010586
2017-05-13 10:05 Torr Samaho Note Revision Dropped: 17632: 0010587
2017-05-17 02:42 Combinebobnt Note Added: 0017702
2017-05-17 03:11 Ru5tK1ng Note Added: 0017703
2017-05-17 03:11 Ru5tK1ng Status needs testing => resolved
2017-05-17 03:11 Ru5tK1ng Resolution open => fixed
2017-05-17 03:11 Ru5tK1ng Product Version => 3.0-beta
2017-05-17 03:11 Ru5tK1ng Fixed in Version => 3.0

Questions or other issues? Contact Us.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker