Refactor flash lighting, improve laser scope lighting
This commit is contained in:
@@ -2144,7 +2144,7 @@ itemLaserScopeEffect
|
||||
| invid == _crInvSel cr
|
||||
= w & particles' %~ (:) (makeLaserScope sp ep d reloadFrac)
|
||||
& creatures . ix (_crID cr) . crInv . ix invid . itHammer %~ moveHammerUp
|
||||
& flareWidth 2 1 15 32 col 0.05 0.1 (ep -.- 4 *.* unitVectorAtAngle d)
|
||||
& laserScopeTargetGlow col glowPoint
|
||||
-- this flare MAY be buggy... something to do with the creature glare
|
||||
| otherwise = w
|
||||
where
|
||||
@@ -2156,6 +2156,9 @@ itemLaserScopeEffect
|
||||
ep = case listToMaybe $ thingsHitLongLine sp xp w of
|
||||
Just (p,_) -> p
|
||||
Nothing -> xp
|
||||
glowPoint = case listToMaybe $ thingsHitLongLine sp xp w of
|
||||
Just (p,E3x2 wl) -> p +.+ 2 *.* wallNormal wl
|
||||
_ -> (ep -.- 2 *.* unitVectorAtAngle d)
|
||||
it = (cr ^. crInv) IM.! invid
|
||||
reloadFrac
|
||||
| _wpLoadedAmmo it == 0 = 1
|
||||
|
||||
Reference in New Issue
Block a user