Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Colshape hit detection never checked dimension or interior, so a colshape in dimension 1 would still fire
onClientColShapeHit/onColShapeHit(andisElementWithinColShapewould return true) for an element standing in dimension 0.setElementDimensionalso never re-evaluated an existing collision, so a stale collision stayed registered until the element moved out of the shapeBoth checks are now available as opt-in per colshape flags, so nothing changes for existing servers or scripts
Closes #3855.
New functions
Both default to false, which keeps the current (documented) behaviour exactly as it is today
Event parameters
onColShapeHit/onColShapeLeaveandonElementColShapeHi/onElementColShapeLeave(plus their client versions) now pass two additional arguments so scripts no longer have to resolve them manually:The extra arguments are appended at the end; the existing two keep their position, so current handlers are unaffected
Test plan
Set
setColShapeCheckDimension/setColShapeCheckInterioron a colshape in another dimension, then walk in and out with diffrent dimensions and confirm thatonColShapeHit/onColShapeLeaveno longer fire for the mismatching dimension/interior, and that the new event arguments report the element's dimension and interiorChecklist