MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0001022 | Zandronum | [All Projects] Bug | public | 2012-09-07 10:22 | 2018-09-30 23:00 |
|
Reporter | unknownna | |
Assigned To | Edward-san | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 1.0 | |
Target Version | 1.4 | Fixed in Version | 2.0 | |
|
Summary | 0001022: Rotating polyobjects aren't reset after map resets online |
Description | Rotating polyobjects are still rotating after map resets online. |
Steps To Reproduce | 1. zandronum.exe -host -file polyobject_test_03.wad +survival 1
2. Connect a client to the server and join the game.
3. Push the switch before the warm-up countdown ends. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0001102 | closed | Edward-san | PolyObject desync when using this code | related to | 0000830 | feedback | TIHan | Poly objects with more than one thinker were not properly reset on map reset. |
|
Attached Files | polyobject_test_03.wad (2,824) 2012-09-07 10:22 https://zandronum.com/tracker/file_download.php?file_id=695&type=bug
polyobject_test_03b.wad.zip (14,630) 2012-09-07 21:30 https://zandronum.com/tracker/file_download.php?file_id=696&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2012-09-07 10:22 | unknownna | New Issue | |
2012-09-07 10:22 | unknownna | File Added: polyobject_test_03.wad | |
2012-09-07 10:22 | unknownna | Status | new => confirmed |
2012-09-07 11:54 | Dusk | Assigned To | => Dusk |
2012-09-07 11:54 | Dusk | Status | confirmed => assigned |
2012-09-07 12:38 | Dusk | Note Added: 0004608 | |
2012-09-07 21:06 | Dusk | Note Added: 0004614 | |
2012-09-07 21:06 | Dusk | Note Edited: 0004614 | bug_revision_view_page.php?bugnote_id=4614#r2495 |
2012-09-07 21:30 | Dusk | Note Added: 0004615 | |
2012-09-07 21:30 | Dusk | File Added: polyobject_test_03b.wad.zip | |
2012-09-07 21:31 | Dusk | Status | assigned => needs review |
2012-09-08 19:00 | Torr Samaho | Note Added: 0004624 | |
2012-09-08 19:00 | Torr Samaho | Status | needs review => feedback |
2012-09-30 00:31 | Dusk | Status | feedback => assigned |
2012-09-30 00:44 | Dusk | Note Added: 0004853 | |
2012-09-30 00:44 | Dusk | Status | assigned => needs review |
2012-09-30 06:58 | Torr Samaho | Note Added: 0004857 | |
2012-09-30 06:59 | Torr Samaho | Status | needs review => feedback |
2012-09-30 14:27 | Dusk | Note Added: 0004880 | |
2012-09-30 14:48 | Dusk | Status | feedback => needs review |
2012-09-30 19:45 | Torr Samaho | Note Added: 0004886 | |
2012-09-30 19:45 | Torr Samaho | Status | needs review => feedback |
2015-01-15 18:38 | Edward-san | Note Added: 0011387 | |
2015-01-15 18:44 | Edward-san | Assigned To | Dusk => Edward-san |
2015-01-15 18:44 | Edward-san | Status | feedback => needs review |
2015-01-16 19:51 | Edward-san | Note Edited: 0011387 | bug_revision_view_page.php?bugnote_id=11387#r6415 |
2015-01-17 10:30 | cobalt | Status | needs review => needs testing |
2015-01-17 10:30 | cobalt | Target Version | => 1.4 |
2015-01-17 10:30 | cobalt | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=6421#r6421 |
2015-01-17 10:30 | cobalt | Note Added: 0011404 | |
2015-01-17 11:10 | Edward-san | Relationship added | related to 0001102 |
2015-01-17 11:10 | Edward-san | Relationship added | related to 0000830 |
2015-03-29 20:20 | Dusk | Status | needs testing => resolved |
2015-03-29 20:20 | Dusk | Fixed in Version | => 2.0 |
2015-03-29 20:20 | Dusk | Resolution | open => fixed |
2018-09-30 23:00 | Blzut3 | Status | resolved => closed |
Notes |
|
(0004608)
|
Dusk
|
2012-09-07 12:38
|
|
Great to see you again unknownna! :) |
|
|
(0004614)
|
Dusk
|
2012-09-07 21:06
|
|
also noticed that if a polyobj is still in move while the reset happens, the switch cannot be activated again
|
|
|
(0004615)
|
Dusk
|
2012-09-07 21:30
|
|
|
|
|
Do you intentionally use pPolyAct->GetPolyObj() instead of pPoly as argument of SERVERCOMMANDS_PlayPolyobjSound? At first glance I'd say both should do the same, but since you call pPolyAct->Destroy( ) destroy before SERVERCOMMANDS_PlayPolyobjSound and SN_StopSequence uses pPoly, it's probably safer to use pPoly as argument.
Also, instead of adding three (NETWORK_GetState( ) == NETSTATE_SERVER) checks one should be enough if you put it into an outer if. IMHO this also makes the code a little easier to read. |
|
|
(0004853)
|
Dusk
|
2012-09-30 00:44
|
|
|
|
|
Looks good except for one thing: Did you intentionally remove "pPoly->specialdata = NULL"? You call Destroy() on the object pPoly->specialdata is pointing to, so I'd say you should also NULL the pointer to the destroyed object like it was done before. |
|
|
(0004880)
|
Dusk
|
2012-09-30 14:27
|
|
|
|
|
Unfortunately, I noticed another issue while reading the latest version: You cast pPoly->specialdata to DPolyAction* and then call pPolyAct->GetPolyObj( ) without checking whether the cast was successful. If pPoly->specialdata is not of type DPolyAction, this will crash. The old code did this properly: It cast pPoly->specialdata to DPolyAction and then checked whether the result was NULL. So instead of
// [Dusk] If a polyobj thinker of any kind exists, it needs to be destroyed
DPolyAction* pPolyAct = NULL;
if ( pPoly->specialdata )
{
pPolyAct = static_cast<DPolyAction*>( pPoly->specialdata );
you should do
// [Dusk] If a polyobj thinker of any kind exists, it needs to be destroyed
DPolyAction* pPolyAct = static_cast<DPolyAction*>( pPoly->specialdata );
if ( pPolyAct )
{
I'm sorry that I didn't notice this earlier. |
|
|
(0011387)
|
Edward-san
|
2015-01-15 18:38
(edited on: 2015-01-16 19:51) |
|
|
|
(0011404)
|
cobalt
|
2015-01-17 10:30
|
|
|