From bc3716886f6841922b5950ee23a78e255f608b0f Mon Sep 17 00:00:00 2001 From: LiddulBOFH <13317534+LiddulBOFH@users.noreply.github.com> Date: Sun, 9 Jun 2024 20:35:16 -0500 Subject: [PATCH] Fix for test failure Ballistics tests were failing since the new mask assignment checked bullet caliber, but the tests didn't assign a caliber --- lua/acf/ballistics/ballistics_sv.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/acf/ballistics/ballistics_sv.lua b/lua/acf/ballistics/ballistics_sv.lua index 58864860..40d1614f 100644 --- a/lua/acf/ballistics/ballistics_sv.lua +++ b/lua/acf/ballistics/ballistics_sv.lua @@ -131,7 +131,12 @@ function Ballistics.CreateBullet(BulletData) Bullet.Index = Index Bullet.LastThink = Clock.CurTime Bullet.Fuze = Bullet.Fuze and Bullet.Fuze + Clock.CurTime or nil -- Convert Fuze from fuze length to time of detonation - Bullet.Mask = (Bullet.Caliber < 3 and bit.band(MASK_SOLID,MASK_SHOT) or MASK_SOLID) + CONTENTS_AUX -- I hope CONTENTS_AUX isn't used for anything important? I can't find any references outside of the wiki to it so hopefully I can use this + if Bullet.Caliber then + Bullet.Mask = (Bullet.Caliber < 3 and bit.band(MASK_SOLID,MASK_SHOT) or MASK_SOLID) + CONTENTS_AUX -- I hope CONTENTS_AUX isn't used for anything important? I can't find any references outside of the wiki to it so hopefully I can use this + else + Bullet.Mask = MASK_SOLID + CONTENTS_AUX + end + Bullet.Ricochets = 0 Bullet.GroundRicos = 0 Bullet.Color = ColorRand(100, 255)