H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
203 stars 80 forks source link

make xHighLevelStarTrekDoor.py to be less bad #1470

Open Hazado opened 1 year ago

Hazado commented 1 year ago

Not saying this is better but its less bad

Removes age owner from controlling the triggering of the doors Removes the SendNote() stuff it was doing Removes the doorstack tracking Makes the door opening and closing rely on the SDL triggering Makes the SDL trigger only happen by the person who set off the door sensor

I think ive fixed some of the race conditions but this is a multiplayer script and those are hard to troubleshoot

Hazado commented 1 year ago

I did have one bug happen during my local testing (two clients on the same computer connecting to my local dockersand) If the avatar that triggered the door sensor quit without leaving the sensor region, the sensor wouldn't trigger anymore Think its a multi-client on the same computer bug and not one with the script

Hazado commented 1 year ago

This is a quick review, but I did notice that there is a duplicated variable -- self.SDL["DoorState"] and self.DoorState. It would be nice if only one of these were used.

Yeah, one is a script SDL and the other a class variable. I should probably just use the script SDL

Hazado commented 1 year ago

Added the requested changes

Hazado commented 1 year ago

Tested this change on minkata alpha server. Doors always worked with one bug If the person who opened the doors links out or quits while in the sensor region, the doors will stay open until someone else enters the sensor region.

Hoikas commented 1 year ago

Tested this change on minkata alpha server.

Is "minkata alpha server" now on H'uru? 😮

Hazado commented 1 year ago

Tested this change on minkata alpha server.

Is "minkata alpha server" now on H'uru? 😮

Im ready to test this on trolland :)