Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001022Zandronum[All Projects] Bugpublic2012-09-07 10:222018-09-30 23:00
Reporterunknownna 
Assigned ToEdward-san 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.0 
Target Version1.4Fixed in Version2.0 
Summary0001022: Rotating polyobjects aren't reset after map resets online
DescriptionRotating polyobjects are still rotating after map resets online.
Steps To Reproduce1. 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.
Attached Files? file icon polyobject_test_03.wad [^] (2,824 bytes) 2012-09-07 10:22
zip file icon polyobject_test_03b.wad.zip [^] (14,630 bytes) 2012-09-07 21:30

- Relationships
related to 0001102closedEdward-san PolyObject desync when using this code 
related to 0000830feedbackTIHan Poly objects with more than one thinker were not properly reset on map reset. 

-  Notes
User avatar (0004608)
Dusk (developer)
2012-09-07 12:38

Great to see you again unknownna! :)
User avatar (0004614)
Dusk (developer)
2012-09-07 21:06
edited on: 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

User avatar (0004615)
Dusk (developer)
2012-09-07 21:30

fixed:'https://bitbucket.org/CrimsonDusk/neurosphere/changeset/f2cd2ce477490c5d81605063391439fdd807f79c [^]'

There were problems in both moving and rotating polyobjects that were still in move at a map reset. The thinker wasn't deleted properly and the sound sequence wasn't stopped.. the existing code only catered for doors, I generalized it.
Attached edited test case wad with sound sequence
User avatar (0004624)
Torr Samaho (administrator)
2012-09-08 19:00

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.
User avatar (0004853)
Dusk (developer)
2012-09-30 00:44

OK I went around and fixed that:
'https://bitbucket.org/CrimsonDusk/neurosphere/changeset/ba33a6fd7559f59f0028e262b6c1429270cbb885 [^]'

pPoly - polyobjs didn't seem to provide the correct value, so I did that instead.
User avatar (0004857)
Torr Samaho (administrator)
2012-09-30 06:58

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.
User avatar (0004880)
Dusk (developer)
2012-09-30 14:27

I suppose..

Addressed
User avatar (0004886)
Torr Samaho (administrator)
2012-09-30 19:45

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.
User avatar (0011387)
Edward-san (developer)
2015-01-15 18:38
edited on: 2015-01-16 19:51

I don't like to wait. :)

User avatar (0011404)
cobalt (updater)
2015-01-17 10:30

Issue addressed by commit c51a452df562: - Fixed: Rotating polyobjects did not stop on map resets (fixes 1022).
Committed by edward_san [edward-san] on Thursday 15 January 2015 19:36:54

Changes in files:
 docs/zandronum-history.txt | 1 +
 src/g_game.cpp | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

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: ZzZombo
Opponents: No one explicitly opposes this issue yet.

- 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 View Revisions
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 View Revisions
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 View Revisions
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






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker