by Marisa the Magician » Wed Mar 14, 2018 2:49 pm
I've thought of a way to do this easily. I was working on a "WorldLineActivated" event for a different purpose, but it would also allow for handling this. The way I'm writing it at the moment, it's fired on line activation before executing the special but right after checking if the line has a lock, so I can pass the fact that it's locked as a parameter to the event ("ActivatedLine" and "IsLocked" would be added to the WorldEvent struct for this). Linedefs already have the "locknumber" variable exported so it should be trivial to implement what you need.
I'm testing it right now to make sure things work properly.
Edit: A terrible misunderstanding happened. Seems like lock checking isn't done where I expected. This will require different handling.
I've thought of a way to do this easily. I was working on a "WorldLineActivated" event for a different purpose, but it would also allow for handling this. The way I'm writing it at the moment, it's fired on line activation before executing the special but right after checking if the line has a lock, so I can pass the fact that it's locked as a parameter to the event ("ActivatedLine" and "IsLocked" would be added to the WorldEvent struct for this). Linedefs already have the "locknumber" variable exported so it should be trivial to implement what you need.
I'm testing it right now to make sure things work properly.
Edit: A terrible misunderstanding happened. Seems like lock checking isn't done where I expected. This will require different handling.