Author Topic: Support_LegacyDoors w/Fixed ghostbrick collision.  (Read 2767 times)

The JVS Content ghost bricks have collision when Support_LegacyDoors is enabled.
This allowed clients without jets to use their ghost bricks as floating platforms.
I didn't like this.
So I fixed it.
Code: (description.txt) [Select]
Title: Legacy Doors
Author: Rotondo
Support for the old door bricks
DGEDIT - Old version used the collision shape for the ghostbrick.
This causes numerous problems for games where clients shouldn't be allowed to fly, or block doorways at will.
I made it use the noncolliding shape for the ghostshape, and the colliding shape for the regular shape.
I tried to change the original code as little as possible.  Search for "DGEDIT" to see all edited sections.
https://www.dropbox.com/s/ekg26jxov2ziy1q/Support_LegacyDoors.zip?dl=0
Install it in Blockland/Add-Ons/
Modify file properties to make it read-only. (So the launcher doesn't overwrite it.)

If this is ever fixed in the default game, please let me know, and I will remove the file from dropbox.


Oh this is nice. I was having people escape from Boot Camp on my Army RP using this bug.

Now if only someone would fix the glitch that made Legacy Doors duplicate events when the bricks are loaded...

Oh this is nice. I was having people escape from Boot Camp on my Army RP using this bug.

Now if only someone would fix the glitch that made Legacy Doors duplicate events when the bricks are loaded...
I had that problem too.  The add-on that was causing it was a version of Elevators.

If I remember right when bricks were loading it was running Parent::onPlant instead of Parent::onLoadPlant.
Which is a pretty easy mistake to make when using copy and paste.  I wouldn't be surprised if elevators wasn't the only add-on that did this.

I had that problem too.  The add-on that was causing it was a version of Elevators.

If I remember right when bricks were loading it was running Parent::onPlant instead of Parent::onLoadPlant.
Which is a pretty easy mistake to make when using copy and paste.  I wouldn't be surprised if elevators wasn't the only add-on that did this.
You mean this part?
Code: [Select]
package ElevatorPackage
{
    function fxDTSBrick::onPlant(%this)
    {
Parent::onPlant(%this);
if(%this.getDatablock().isElevator)
    %this.elevatorCreate();
    }
    function fxDTSBrick::onLoadPlant(%this)
    {
Parent::onPlant(%this);
if(%this.getDatablock().isElevator)
    %this.elevatorCreate();
    }
    function fxDTSBrick::onRemove(%this)
    {
Parent::onRemove(%this);
if(%this.elevatorGlass)
{
    MissionCleanup.remove(%this.elevatorGlass);
    %this.elevatorGlass.delete();
}
    }
};
activatePackage(ElevatorPackage);

Yep.  That's it.
Code: [Select]
    function fxDTSBrick::onLoadPlant(%this)
    {
Parent::onPlant(%this);
if(%this.getDatablock().isElevator)
    %this.elevatorCreate();
    }
needs to be
Code: [Select]
    function fxDTSBrick::onLoadPlant(%this)
    {
Parent::onLoadPlant(%this);
if(%this.getDatablock().isElevator)
    %this.elevatorCreate();
    }

Yep.  That's it.
Code: [Select]
    function fxDTSBrick::onLoadPlant(%this)
    {
Parent::onPlant(%this);
if(%this.getDatablock().isElevator)
    %this.elevatorCreate();
    }
needs to be
Code: [Select]
    function fxDTSBrick::onLoadPlant(%this)
    {
Parent::onLoadPlant(%this);
if(%this.getDatablock().isElevator)
    %this.elevatorCreate();
    }
Oooooooooooh. I missed that when I looked at it. Thanks for the help. That glitch has been plaguing my game. Every time I crash (and trust me, I crash often), I need to remove a bunch of door events on the normally/semi-normally unopenable elevators, airlock doors, and security doors.