]> git.lizzy.rs Git - minetest.git/commit
Damage flash: Reduce maximum alpha. Avoid fade overload
authorparamat <mat.gregory@virginmedia.com>
Wed, 5 Oct 2016 00:25:02 +0000 (01:25 +0100)
committerparamat <mat.gregory@virginmedia.com>
Fri, 21 Oct 2016 04:48:53 +0000 (05:48 +0100)
commit0c76303186d968db89d699d9e512aea9904378bc
tree79b85d905cb457d87f24761082fa72e3523551e7
parent63a3bb229a9ff288ab01e3e80c8477da5e84ee1e
Damage flash: Reduce maximum alpha. Avoid fade overload

Flash alpha maximum is reduced from 180 to 127 to avoid player blindness
in combat. Flash alpha minimum is unchanged.
The 'damage_flash' value is now limited to max alpha, to avoid multiple
hits creating a huge value that causes flash to stay at maximum alpha
for a long period. Now alpha always starts to fade immediately after
taking damage.
Both problems can be seen in Minetest let's play videos.
Simplify and optimise some code.
src/game.cpp