PseudonymousEd Posted October 2, 2021 Share Posted October 2, 2021 (edited) The FastHealer and SlowHealer traits affect how much time it takes to heal a fracture caused by landing from a high distance. float f2 = Rand.Next(50, 80); if (this.Traits.FastHealer.isSet()) { f2 = Rand.Next(30, 50); } else if (this.Traits.SlowHealer.isSet()) { f2 = Rand.Next(80, 150); } switch (SandboxOptions.instance.InjurySeverity.getValue()) { case 1: { f2 *= 0.5f; break; } case 3: { f2 *= 1.5f; } } this.getBodyDamage().getBodyPart(BodyPartType.FromIndex(Rand.Next(BodyPartType.ToIndex(BodyPartType.UpperLeg_L), BodyPartType.ToIndex(BodyPartType.Foot_R) + 1))).setFractureTime(f2); EDIT: FastHealer and SlowHealer ARE factors in how much time it takes to heal a fracture caused by a vehicle accident. It's just higher up in the code than where I was looking! But FastHealer and SlowHealer aren't factors in how much time it takes to heal a fracture caused by a vehicle accident. In the BaseVehicle class: else if (f2 > 50.0f && Rand.Next(10) == 0 && SandboxOptions.instance.BoneFracture.getValue()) { if (bodyPart.getType() == BodyPartType.Neck || bodyPart.getType() == BodyPartType.Groin) { bodyPart.generateDeepWound(); } else { bodyPart.setFractureTime(Rand.Next(Rand.Next(10.0f, f2 + 10.0f), Rand.Next(f2 + 20.0f, f2 + 30.0f))); } } There is no reference to FastHealer or SlowHealer. Edited October 3, 2021 by PseudonymousEd Realized I was wrong. This is not a bug. Sedgwick and TheZombiesPro115 2 Link to comment Share on other sites More sharing options...
TheZombiesPro115 Posted October 3, 2021 Share Posted October 3, 2021 Can you make a song about it so we can remember how vehicle collisions work? Honestly don't know what we'd do without you, PseudoEd. Link to comment Share on other sites More sharing options...
PseudonymousEd Posted October 3, 2021 Author Share Posted October 3, 2021 Sorry, my mistake. I didn't see that further up in the code the fracture time is modified by slow healer or fast healer! Just does it differently than it does when landing from a high level. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now