Source Code Project Mantis - FSSCP
View Issue Details
0003010FSSCPbeamspublic2014-02-18 14:592022-06-10 20:53
ReporterJoshua 
Assigned ToMjnMixael 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformR10541OSWindowsOS Version7
Product Version3.7.1 
Target VersionFixed in Version22.0.0 
Summary0003010: Beams stay whilst ship casting them has been destroyed.
DescriptionI am aware of a ship being capable of shooting weapons whilsts it's in it's "Final detonation" sequence, but currently, beams are able to fully finish their firing sequence even though the ship firing has been destroyed. The beams "Stay on" for their predetermined time whilst the ship's model has already been reduced to fiery debris.
Additional InformationTested repeatedly in the "Rescue" mission of the "Incursion" campaign (as provided by the campaign restoration project")
TagsNo tags attached.
Attached Files? DestroyedBeamTest.fs2 (5,775) 2022-06-10 14:32
http://scp.indiegames.us/mantis/file_download.php?file_id=2730&type=bug

Notes
(0016718)
SmashMonkey   
2015-05-22 01:04   
Replicable. Inspection of beam.cpp shows that the check for beam firing only takes place during the beam warmup. There is no way to turn off the beams mid-firing (if the firing ship has been destroyed).
(0016720)
MageKing17   
2015-05-22 01:35   
There is code that is supposed to serve this purpose, in beam_move_all_pre():

        // check if parent object has died, if so then delete beam
        if (b->objp->type == OBJ_NONE) {
            // set next beam
            moveup = GET_NEXT(moveup);
            // delete current beam
            beam_delete(b);

            continue;
        }


The object's type should be set to OBJ_NONE when it's deleted, which should happen shortly after OF_SHOULD_BE_DEAD gets set, which should happen if the ship is either vaporized or finished exploding.

Is the problem that beams aren't stopping during the process of dying? Because that seems like intended behavior.
(0017121)
MjnMixael   
2022-06-10 14:32   
Verified that ships upon final death have their beams deleted. Tested with the attached mission.

Press 1 to fire beam.
Press 2 to vaporize ship.
OR
Press 3 to self destruct ship.

Recommend closing.

Issue History
2014-02-18 14:59JoshuaNew Issue
2014-08-17 00:38Echelon9Priorityhigh => low
2015-05-22 01:04SmashMonkeyNote Added: 0016718
2015-05-22 01:35MageKing17Note Added: 0016720
2022-06-10 14:32MjnMixaelFile Added: DestroyedBeamTest.fs2
2022-06-10 14:32MjnMixaelNote Added: 0017121
2022-06-10 14:55z64555Assigned To => MjnMixael
2022-06-10 14:55z64555Statusnew => closed
2022-06-10 14:55z64555Resolutionopen => fixed
2022-06-10 14:55z64555Fixed in Version => 22.0.0
2022-06-10 20:53Goober5000Statusclosed => resolved