Skip to content

Commit

Permalink
Fix for test failure
Browse files Browse the repository at this point in the history
Ballistics tests were failing since the new mask assignment checked bullet caliber, but the tests didn't assign a caliber
  • Loading branch information
LiddulBOFH committed Jun 10, 2024
1 parent de52a56 commit bc37168
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/acf/ballistics/ballistics_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bc37168

Please sign in to comment.