MantisBT - Zandronum
View Issue Details
0002897Zandronum[All Projects] Bugpublic2016-10-15 14:382024-04-08 23:42
unknownna 
 
normalminoralways
resolvedfixed 
2.1 
3.23.2 
0002897: Player_SetTeam causes client to initially select fist rather than pistol with different switchonpickup settings online
When you join a team through Player_SetTeam online it causes you to bring up the fist rather than the pistol.
teamroom.wad

1. zandronum -host -iwad doom2.wad -file teamroom.wad +ctf 1
2. zandronum -iwad doom2.wad -file teamroom.wad -connect localhost +switchonpickup 0
3. Join the game.
4. Move onto one of the teleporters to join a team. It will have you select the fist first rather than the pistol.
It's a regression since 1.0.
No tags attached.
Issue History
2016-10-15 14:38unknownnaNew Issue
2016-10-18 20:16Ru5tK1ngNote Added: 0016051
2016-10-18 20:16Ru5tK1ngStatusnew => feedback
2016-10-19 08:29unknownnaNote Added: 0016055
2016-10-19 08:29unknownnaStatusfeedback => new
2016-10-19 08:32unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9785#r9785
2016-10-19 08:32unknownnaAdditional Information Updatedbug_revision_view_page.php?rev_id=9787#r9787
2016-10-19 08:33unknownnaSummaryPlayer_SetTeam causes client to initially select fist rather than pistol online => Player_SetTeam causes client to initially select fist rather than pistol with different switchonpickup settings online
2024-03-12 20:32Ru5tK1ngNote Added: 0023378
2024-03-12 20:32Ru5tK1ngStatusnew => confirmed
2024-03-13 04:40Ru5tK1ngNote Edited: 0023378bug_revision_view_page.php?bugnote_id=23378#r14126
2024-03-13 04:41Ru5tK1ngNote Added: 0023379
2024-03-13 04:41Ru5tK1ngAssigned To => Ru5tK1ng
2024-03-13 04:41Ru5tK1ngStatusconfirmed => feedback
2024-03-13 14:42unknownnaNote Added: 0023383
2024-03-13 14:42unknownnaStatusfeedback => assigned
2024-03-13 20:16Ru5tK1ngNote Added: 0023387
2024-03-13 20:49Ru5tK1ngNote Added: 0023388
2024-03-14 04:48Ru5tK1ngStatusassigned => feedback
2024-03-14 06:07unknownnaNote Added: 0023392
2024-03-14 06:07unknownnaStatusfeedback => assigned
2024-03-14 16:23Ru5tK1ngNote Added: 0023398
2024-03-14 16:23Ru5tK1ngAssigned ToRu5tK1ng =>
2024-03-14 16:23Ru5tK1ngStatusassigned => needs review
2024-03-24 21:17Ru5tK1ngNote Added: 0023486
2024-03-24 21:17Ru5tK1ngStatusneeds review => needs testing
2024-03-24 21:17Ru5tK1ngTarget Version => 3.2
2024-04-08 23:42Ru5tK1ngNote Added: 0023565
2024-04-08 23:42Ru5tK1ngStatusneeds testing => resolved
2024-04-08 23:42Ru5tK1ngResolutionopen => fixed
2024-04-08 23:42Ru5tK1ngFixed in Version => 3.2

Notes
(0016051)
Ru5tK1ng   
2016-10-18 20:16   
I tried this with 2.1.2 and I never selected the fist when moving over the teleports. I double checked that ctf was true.
(0016055)
unknownna   
2016-10-19 08:29   
This is caused by switchonpickup 0 (never) and switchonpickup 3 (use PWO) + pwo_switchonsameweight 0. If you have the pistol set higher than the fist with the PWO, the bug won't appear. In any case, the pistol is always brought up first offline regardless of the settings. It turns out that it has actually been broken ever since 1.0, as setting switchonpickup to 0 brings up the fist there as well. It's a regression since it works fine in Skulltag 98d. I think it got broken when we worked on the weapon sync issues way back.
(0023378)
Ru5tK1ng   
2024-03-12 20:32   
(edited on: 2024-03-13 04:40)
'https://foss.heptapod.net/zandronum/zandronum-stable/-/blob/branch/default/src/p_interaction.cpp#L2355 [^]'

Here's the difference. In single player this block is executed fully which results in no issue with the weapon pickup regardless of PWO settings.

However for clients it's different. Because bUnarmed is never true on the clients, they have to wait for the server to send out the inventory which causes them to follow the same code trace as SP. When the server sends a command to reset the inventory followed by syncing the ammo, this is where it sort of falls apart if you don't have the 'right' PWO setting.

(0023379)
Ru5tK1ng   
2024-03-13 04:41   
@Unknownna can you check this build out and see if anything breaks?

'https://www.mediafire.com/file/1wy05tv4ad7rsxx/zandronum_3.2_r240311-0546M.zip/file [^]'

My testing worked out well but another pair of eyes helps for something like this.
(0023383)
unknownna   
2024-03-13 14:42   
Hey, it seems that it still selects the fist if switchonpickup is 3 (PWO), and the fist and pistol preference have the same value. Offline, it selects the pistol as expected.

It fixed the issue for switchonpickup 0 though.
(0023387)
Ru5tK1ng   
2024-03-13 20:16   
It doesn't seem there is a good way to fix this. Offline is no issue because SP isn't a client and isn't subject to the item syncing.

The problem is that the items are given one at a time to the client. To simulate this, do 'take all' then give yourself the fist then pistol and then do the reverse. You'll notice that different PWO settings will switch to the fist.
(0023388)
Ru5tK1ng   
2024-03-13 20:49   
Try this build out:

'https://www.mediafire.com/file/mfld9obhs2j08gd/zandronum_3.2_r240311-0546M3.zip/file [^]'
(0023392)
unknownna   
2024-03-14 06:07   
yeah, that seems to have fixed it. It now always selects the pistol as expected. Thanks!
(0023398)
Ru5tK1ng   
2024-03-14 16:23   
Thanks for testing. Merge request

'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/57 [^]'
(0023486)
Ru5tK1ng   
2024-03-24 21:17   
This was merged in:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/0913905b803e3332a480987aaf44c12bff08dba7 [^]'
(0023565)
Ru5tK1ng   
2024-04-08 23:42   
Since this was tested by Unknownna previously, marking as resolved.