Cleanup
This commit is contained in:
@@ -113,10 +113,9 @@ mcTriggerVal mc = case mc ^. mcSensor of
|
||||
s@ProximitySensor{} -> s ^? sensToggle
|
||||
s@SensorToggleAmount{} -> Just $ (_sensAmount s) > 900
|
||||
|
||||
|
||||
mcPlaySound :: Machine -> World -> World
|
||||
mcPlaySound mc w = case _mcCloseSound mc of
|
||||
Just sid | d < 200 -> soundContinueVol (1-0.005*d) (MachineSound mid) (_mcPos mc) sid (Just 2) w
|
||||
Just sid | d < 200 -> soundContinueVol (1-0.01*max 0 (d-100)) (MachineSound mid) (_mcPos mc) sid (Just 2) w
|
||||
_ -> w
|
||||
where
|
||||
d = dist (_crPos $ you w) (_mcPos mc)
|
||||
|
||||
Reference in New Issue
Block a user