Fix bullet randomness (from eg bangCone)
This commit is contained in:
@@ -478,14 +478,14 @@ makeBullet thebullet itm cr mz w =
|
||||
)
|
||||
where
|
||||
bulpos = _crPos cr + rotateV (_crDir cr) (_mzPos mz + aimingWeaponZeroPos cr itm + V2 0 offset)
|
||||
(a,g) = randomR (-inacc,inacc) $ _randGen w
|
||||
(a,g'') = randomR (-inacc,inacc) $ _randGen w
|
||||
inacc = _mzInaccuracy mz
|
||||
drag = case _rifling (_heldParams $ _itUse itm) of
|
||||
ConstFloat x -> x
|
||||
UniRandFloat x y -> fst . randomR (x,y) $ _randGen w
|
||||
muzvel = case _muzVel $ _heldParams $ _itUse itm of
|
||||
ConstFloat x -> x
|
||||
UniRandFloat x y -> fst . randomR (x,y) $ _randGen w
|
||||
(drag,g') = case _rifling (_heldParams $ _itUse itm) of
|
||||
ConstFloat x -> (x,g'')
|
||||
UniRandFloat x y -> randomR (x,y) g''
|
||||
(muzvel,g) = case _muzVel $ _heldParams $ _itUse itm of
|
||||
ConstFloat x -> (x,g')
|
||||
UniRandFloat x y -> randomR (x,y) g'
|
||||
dir = _crDir cr + _mzRot mz + a
|
||||
offset = case itm ^? itUse . heldParams . randomOffset of
|
||||
Just x | x /= 0 -> fst . randomR (-x,x) $ _randGen w
|
||||
|
||||
Reference in New Issue
Block a user