Refactor flash lighting, improve laser scope lighting

This commit is contained in:
2021-03-23 19:36:59 +01:00
parent 3e2eaeece2
commit 021ff857fc
4 changed files with 25 additions and 39 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ module Dodge.Item.Weapon.TriggerType
import Dodge.Data
import Dodge.SoundLogic
import Dodge.CreatureAction (reloadWeapon)
import Dodge.WorldEvent (muzFlareAt,lowLightAt,tempLightForAt)
import Dodge.WorldEvent (muzzleFlashAt,tempLightForAt)
import Dodge.RandomHelp
import Dodge.Item.Weapon.Bullet
@@ -95,7 +95,7 @@ shoot f cid w | fireCondition = over (pointerToItem . wpLoadedAmmo) (\ammo -> am
withMuzFlare :: (Int -> World -> World) -> Int -> World -> World
withMuzFlare f cid w = tempLightForAt 3 pos
. muzFlareAt pos2 $ f cid w
. muzzleFlashAt pos2 $ f cid w
where cr = _creatures w IM.! cid
dir = _crDir cr
pos = _crPos cr +.+ _crRad cr *.* unitVectorAtAngle (_crDir cr)