Ticket #41576

Various small patches - 2021/02/14

Open Date: 2021-02-15 04:04 Last Update: 2021-02-22 05:17

Reporter:
Owner:
(None)
Type:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Accepted
File:
7

Details

Here are some patches that fix two issues reported on the roadmap. 10264 fixes an issue with A_SkullPop where players who spectate while the PlayerChunk actor is in the air still retain the mobj of the PlayerChunk actor rather than that of their player class. This fixes: https://zandronum.com/tracker/view.php?id=3252

10265 fixes user variables not being reset to zero for actors that aren't respawned during a map reset. This seemingly fixes the issue reported in: https://zandronum.com/tracker/view.php?id=3213 as the SwitchableDecoration actor didn't need to respawn under reasonable conditions (doesn't change position, current (dormant) state matches the original state, health is unchanged), but its user variables weren't reset.

The next thing to fix is an issue with A_SkullPop and SKININFO, if it's zandronum-specific: https://zandronum.com/tracker/view.php?id=2762

EDIT: I forgot I had a patch from a few months ago which fixes actors inheriting and replacing WhiteFlag not working properly. I attached it too.

Ticket History (3/20 Histories)

2021-02-15 04:04 Updated by: akmdm
  • New Ticket "Various small patches - 2021/02/14" created
2021-02-15 04:08 Updated by: akmdm
  • Details Updated
2021-02-15 05:31 Updated by: torr_samaho
Comment

10264 should get a "pPlayer->mo != NULL" check in PLAYER_SetSpectator before accessing "pPlayer->mo->GetClass()->TypeName != pPlayer->cls->TypeName ))". I would also check "pPlayer->mo->target != NULL" before passing this into pmo.

2021-02-15 05:44 Updated by: torr_samaho
Comment

I added the other two patches.

2021-02-15 05:53 Updated by: akmdm
Comment

I uploaded 10264_r2.patch which adds the NULL checks for mo and pmo. Thank you for pushing the other two patches.

2021-02-22 04:29 Updated by: torr_samaho
Comment

Thanks for the update! I added 10264_r2.patch.

2021-02-22 04:41 Updated by: torr_samaho
Comment

Some quick remarks on 10265:

- I don't think everyone will want the timestamps, so I'd say con_showtimestamps should default to false.

- Please add a short comment with your initials add the end of the AddLine where you added timestamp as additional argument.

- As far as I can tell, TimeStamps is not initialized before the first TimeStampsi != NULL is done. memset (TimeStamps, 0, sizeof(TimeStamps)); should be called once in the beginning at an appropriate place.

2021-02-22 04:47 Updated by: akmdm
Comment

Reply To torr_samaho

Some quick remarks on 10265: - I don't think everyone will want the timestamps, so I'd say con_showtimestamps should default to false. - Please add a short comment with your initials add the end of the AddLine where you added timestamp as additional argument. - As far as I can tell, TimeStamps is not initialized before the first TimeStampsi != NULL is done. memset (TimeStamps, 0, sizeof(TimeStamps)); should be called once in the beginning at an appropriate place.

Thanks, I can add those changes quickly. I also added another patch 10266 which blacklists the ignore, forcespec, kick, and ban CCMDs from ACS ConsoleCommand.

2021-02-22 05:01 Updated by: torr_samaho
Comment

Thanks for 10266! Looks pretty good, I just wonder whether any mods rely on forcespec.

2021-02-22 05:02 Updated by: akmdm
Comment

I added 10265_r2.patch, which adds the changes you suggested for the timestamps. The timestamp string array gets initialized in C_InitConback() appropriately, as this function gets called first before anything else. For the changes to the AddLine calls which add the timestamp argument, I added Leonard's name instead, as the changes originally came from his commit(s).

Reply To torr_samaho

Thanks for 10266! Looks pretty good, I just wonder whether any mods rely on forcespec.

I'm not sure if there are any active mods currently relying on ConsoleCommand("forcespec"). This might've been more common when Skulltag was active, or the early days of Zandronum, when there were less safe alternatives to ConsoleCommand. The ForceToSpectator ACS function has existed for a while, so I assume people have been using that function since.

I remember Zombie Horde had an "anti-rq" addon years ago which banned the player from the server for 10 minutes if they tried to leave the game as a zombie. Now, I think it only forces the player to spectators using the aforementioned ACS function when they rejoin the game after leaving as a zombie.

(Edited, 2021-02-22 05:11 Updated by: akmdm)
2021-02-22 05:13 Updated by: torr_samaho
Comment

Sounds reasonable. I added 10265_r2 (thanks for the quick update) and 10266.

2021-02-22 05:16 Updated by: torr_samaho
Comment

If I didn't overlook anything, all patches are in now.

Comment

Reply To torr_samaho

Sounds reasonable. I added 10265_r2 (thanks for the quick update) and 10266.

Great, thank you so much!

2021-02-22 05:17 Updated by: torr_samaho
  • Status Update from Open to Closed
  • Resolution Update from None to Accepted

Attachment File List

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login