MantisBT - Zandronum
View Issue Details
0000801Zandronum[All Projects] Bugpublic2012-04-22 16:572018-09-30 19:52
unknownna 
Dusk 
normalminoralways
closedfixed 
98d 
1.0 
0000801: MageWandSmoke actor not removed online
Attached screenshot.
Actor DoomPlayer_02 : DoomPlayer
{
    Player.StartItem "Pistol_02"
}

Actor Pistol_02 : Pistol
{
    Weapon.SlotNumber 2
    Weapon.AmmoUse 0
    States
    {
    Fire:
        PISG A 5 A_FireCustomMissile ("RailBotBeam")
        Goto Ready
    }
}

Actor RailBotBeam : MageWandMissile
{
    Speed 10
    FastSpeed 20
    SeeSound "*fist"
    DeathSound "*fist"
    -RIPPER
    States
    {
    Spawn:
        PLAY CD 4 Bright
        Loop
    Death:
        PLAY E 4 Bright
        PLAY F 3 Bright
        PLAY G 4 Bright
        PLAY H 3 Bright
        PLAY I 4 Bright
        Stop
    }
}

Actor BeamTrail : MageWandSmoke replaces MageWandSmoke
{
    States
    {
    Spawn:
        BAL1 A 2 bright
    Fade:
        BAL1 A 1 bright A_FadeOut(0.1)
        Loop
    }
}
No tags attached.
related to 0000240closed Torr Samaho Heretic, powered dragon claw 
? magewandsmoke_01.wad (769) 2012-04-22 16:57
https://zandronum.com/tracker/file_download.php?file_id=567&type=bug
png Screenshot_Doom_20120422_185449.png (43,596) 2012-04-22 16:58
https://zandronum.com/tracker/file_download.php?file_id=568&type=bug
png
Issue History
2012-04-22 16:57unknownnaNew Issue
2012-04-22 16:57unknownnaFile Added: magewandsmoke_01.wad
2012-04-22 16:57unknownnaStatusnew => confirmed
2012-04-22 16:57unknownnaAdditional Information Updatedbug_revision_view_page.php?rev_id=1799#r1799
2012-04-22 16:58unknownnaFile Added: Screenshot_Doom_20120422_185449.png
2012-04-22 17:05unknownnaRelationship addedrelated to 0000240
2012-04-22 18:27DuskAssigned To => Dusk
2012-04-22 18:27DuskStatusconfirmed => assigned
2012-04-23 14:28DuskNote Added: 0003404
2012-04-23 14:28DuskStatusassigned => needs review
2012-04-25 02:07Torr SamahoNote Added: 0003422
2012-04-25 02:07Torr SamahoStatusneeds review => feedback
2012-04-25 02:08Torr SamahoNote Edited: 0003422bug_revision_view_page.php?bugnote_id=3422#r1834
2012-04-25 02:08Torr SamahoNote Revision Dropped: 3422: 0001833
2012-04-25 12:15Torr SamahoNote Edited: 0003422bug_revision_view_page.php?bugnote_id=3422#r1843
2012-04-25 12:18Torr SamahoNote Edited: 0003422bug_revision_view_page.php?bugnote_id=3422#r1844
2012-04-30 01:24DuskNote Added: 0003503
2012-05-13 23:59DuskStatusfeedback => assigned
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2012-06-09 13:52Torr SamahoNote Added: 0003708
2012-06-09 13:52Torr SamahoStatusassigned => needs testing
2012-08-02 13:49WatermelonNote Added: 0004197
2012-08-02 19:10Torr SamahoStatusneeds testing => resolved
2012-08-02 19:10Torr SamahoFixed in Version => 1.0
2012-08-02 19:10Torr SamahoResolutionopen => fixed
2018-09-30 19:52Blzut3Statusresolved => closed

Notes
(0003404)
Dusk   
2012-04-23 14:28   
Added proper network handling for MageWandSmoke. Effects applied to it should work properly online. In the process, MageWandSmoke now has +CLIENTSIDEONLY to prevent bandwidth hogging:
'https://bitbucket.org/CrimsonDusk/notebola/changeset/6777bafb17c3 [^]'

I also moved shouldActorNotBeSpawned to network.cpp (and applied NETWORK_InClientMode) so that the mage wand smoke can use it.

My reasoning for +CLIENTSIDEONLY for MageWandSmoke: since there was no synchronization of the smoke actors in the first place, any effects used on it did not work. Like A_FadeOut this ticket was created for. This means that you could never have such codepointers in the smoke and have it working online - and there was no bug reports about it until now. Therefore, adding +CLIENTSIDEONLY to the smoke should be safe. Leaving it out would cause a major bandwidth issue with Hexen, as the mage wand is a rather often used weapon and spawns a lot of these trail actors.
(0003422)
Torr Samaho   
2012-04-25 02:07   
(edited on: 2012-04-25 12:18)
You should be very, very hesitant when altering ZDoom's DECORATE code. Any mod that derives from MageWandSmoke may break if you make any alterations to the code.

Something that is less likely to break here would be handle this similar to what A_CustomMissile is doing when the client spawns something on its own: If you are concerned about the bandwidth, let the client handling the spawning (like it already did since the code was not adapted for Skulltag's c/s approach) but give the actor the client spawned on its own the CLIENTSIDEONLY flag:

        AActor *mo = Spawn ("MageWandSmoke", x, y, hitz, ALLOW_REPLACE);
        if ( NETWORK_InClientMode( ) )
            mo ->ulNetworkFlags |= NETFL_CLIENTSIDEONLY;


BTW: Why did you put the SERVERCOMMANDS_SpawnThing call in there? Since you added CLIENTSIDEONLY to the actor definition, the server will not spawn anything and this code will never be called.

EDIT: I'm not really sure if we want to make this client side. Of course it works for vanilla Hexen, but we have to be aware that it will break mods that replace "MageWandSmoke" with something that's not purely for visual effects. Of course those mods never worked properly in Skulltag since AMageWandMissile::Effect didn't have any special c/s handling.

(0003503)
Dusk   
2012-04-30 01:24   
I was assuming that actors deriving and replacing MageWandSmoke would be effects-only because of the nature of the code. Though, your approach is certainly a lot better...
(0003708)
Torr Samaho   
2012-06-09 13:52   
Since it won't make things worse than they already are I added the patch from 0000801:0003422.
(0004197)
Watermelon   
2012-08-02 13:49   
Confirmed to work online, fadeout done properly, seems to be no apparent lag on my end.