MantisBT - Zandronum
View Issue Details
0001815Zandronum[All Projects] Bugpublic2014-06-05 20:462018-09-30 23:11
Arco 
Torr Samaho 
normalminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
2.0-beta 
2.02.0 
0001815: Projectiles w/ +BOUNCEONACTORS die prematurely
Projectiles with the +BOUNCEONACTORS flag in 2.0 die whenever they come in contact with a solid actor instead of bouncing.
No tags attached.
? bounceonactors_test.wad (926) 2014-06-05 20:46
/tracker/file_download.php?file_id=1216&type=bug
Issue History
2014-06-05 20:46ArcoNew Issue
2014-06-05 20:46ArcoFile Added: bounceonactors_test.wad
2014-06-05 23:08WatermelonNote Added: 0008854
2014-06-05 23:14ArcoNote Added: 0008855
2014-06-15 16:45WatermelonStatusnew => confirmed
2014-07-05 10:37Torr SamahoNote Added: 0009847
2014-07-05 10:37Torr SamahoStatusconfirmed => feedback
2014-07-06 01:15ArcoNote Added: 0009865
2014-07-06 01:15ArcoStatusfeedback => new
2014-12-31 11:35Torr SamahoTarget Version => 2.0
2014-12-31 14:57Edward-sanNote Added: 0011157
2014-12-31 15:23Edward-sanNote Edited: 0011157bug_revision_view_page.php?bugnote_id=11157#r6214
2014-12-31 15:24Edward-sanNote Edited: 0011157bug_revision_view_page.php?bugnote_id=11157#r6215
2015-01-01 11:33Torr SamahoNote Added: 0011160
2015-01-01 12:38DuskAssigned To => Torr Samaho
2015-01-01 12:38DuskStatusnew => assigned
2015-01-01 16:31cobaltStatusassigned => needs testing
2015-01-01 16:32cobaltNote Added: 0011162
2015-01-01 18:13ArcoNote Added: 0011171
2015-01-01 18:13ArcoStatusneeds testing => resolved
2015-01-01 18:13ArcoFixed in Version => 2.0
2015-01-01 18:13ArcoResolutionopen => fixed
2018-09-30 23:11Blzut3Statusresolved => closed

Notes
(0008854)
Watermelon   
2014-06-05 23:08   
Is this a new 2.0 feature or one from 1.2 but broke along the way?
(0008855)
Arco   
2014-06-05 23:14   
I've only seen this bug in 2.0. It does not happen in 1.2 nor 1.3.
(0009847)
Torr Samaho   
2014-07-05 10:37   
For things that work in 1.2, but not in 2.0, the most important question is whether it happens in GZDoom 880.
(0009865)
Arco   
2014-07-06 01:15   
r880 works as intended.
(0011157)
Edward-san   
2014-12-31 14:57   
(edited on: 2014-12-31 15:24)
The bounce code got screwed up by the server handling, which was positioned in a bad place, in p_mobj.cpp:


                    // [BB] The server handles this.
                    if ( (mo->BounceFlags & BOUNCE_Actors) && !NETWORK_InClientMode() )
                    {
                        // Bounce test and code moved to P_BounceActor
                        if (!P_BounceActor(mo, BlockingMobj))

                            // [BB] Inform the clients.
                            if ( NETWORK_GetState( ) == NETSTATE_SERVER )
                            {
                                SERVERCOMMANDS_PlayBounceSound( mo, true );
                                // [BB] We need to inform the clients about the new momentum and sync the position,
                                // but can only do this after calling P_ZMovement. Mark the actor accordingly.
                                mo->ulNetworkFlags |= NETFL_BOUNCED_OFF_ACTOR;
                            }

                        { // Struck a player/creature
                        
                            // Potentially reward the player who shot this missile with an accuracy/precision medal.
                            if ((( mo->ulSTFlags & STFL_EXPLODEONDEATH ) == false ) && mo->target && mo->target->player )
                            {
                                if ( mo->target->player->bStruckPlayer )
                                    PLAYER_StruckPlayer( mo->target->player );
                                else
                                    mo->target->player->ulConsecutiveHits = 0;
                            }

                            P_ExplodeMissile (mo, NULL, BlockingMobj);
                        }


see how the 'if ( NETWORK_GetState( ) == NETSTATE_SERVER )' code is placed between 'if (!P_BounceActor(mo, BlockingMobj))' and '{' . Moving the code after the '{' fixes the bouncing offline. Online it's still broken, the clients are not informed properly about the bounce, and the projectile in the example wad explodes somewhere else.

[edit]changeset 4df0191f8f0e is responsible for this.

(0011160)
Torr Samaho   
2015-01-01 11:33   
You're right. The KDiff3 merging failed here. I'll take care of this.
(0011162)
cobalt   
2015-01-01 16:32   
Issue addressed by commit 69cad01a977a: Fixed a merge error introduced in 4df0191f8f0e4055bb9cf4d484e2c50940b1e13e spotted by Edward-san. This addresses 1815.
Committed by Benjamin Berkels [Torr Samaho] on Thursday 01 January 2015 17:28:37

Changes in files:
 src/p_map.cpp | 10 ++++++++++
 src/p_mobj.cpp | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
(0011171)
Arco   
2015-01-01 18:13   
Issue fixed in r150101-1703.