TTT: Recheck collision rules after group reset #1053

Merged
merged 1 commit into from Sep 4, 2015

Projects

None yet

5 participants

@Kefta
Contributor
Kefta commented Sep 3, 2015

After an immense amount of testing and reading source code, it seems that CollisionRulesChanged is already called internally by SetCollisionGroup, and then RecheckCollisionFilter is called on all of the children PhysObjects subsequently. Initially, calling CollisionRulesChanged immidiately after setting the collision group had no effect as expected, however, calling it in a timer seems to have settled any initial spasms.

Note that this is not a sure fix to all ragdoll related crashes; COLLISION_GROUP_DEBRIS_TRIGGER still seems to have some serious issues sending back collision data at high velocities/high collision rates, but this fix will at least cause less crashes to occur early on.

@Kefta Kefta TTT: Recheck collision rules after group reset
After an immense amount of testing and reading source code, it seems that CollisionRulesChanged is already called internally by SetCollisionGroup, and then RecheckCollisionFilter is called on all of the children PhysObjects subsequently. Initially, calling CollisionRulesChanged immidiately after setting the collision group had no effect as expected, however, calling it in a timer seems to have settled any initial spasms.

Note that this is not a sure fix to all ragdoll related crashes; COLLISION_GROUP_DEBRIS_TRIGGER still seems to have some serious issues sending back collision data at high velocities/high collision rates, but this fix will at least cause less crashes to occur early on.
7a245ed
@robotboy655 robotboy655 added the TTT label Sep 3, 2015
@svdm svdm merged commit 5a38ed8 into garrynewman:master Sep 4, 2015
@svdm
Collaborator
svdm commented Sep 4, 2015

Weird, but hey it's Source. Worth a shot.

@robotboy655
Collaborator

@Kefta have you even tested that timer? To me it appears that it would error as you do not pass the entity object to the function call.

@Kefta
Contributor
Kefta commented Sep 4, 2015

@robotboy655 I tested it with the timer having a seperate function ( function() rag:CollisionRulesChanged() end ), but I thought this would shorten it. I'll test it tonight

@bmwalters
Contributor

:v

@willox
Collaborator
willox commented Sep 4, 2015

nice quality control as per usual @svdm

@robotboy655
Collaborator

Nice commits by @Kefta as per usual.

@bmwalters
Contributor

⚡️

@Kefta
Contributor
Kefta commented Sep 4, 2015

I should probably not make last minute changes and assume they work anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment