zicodxx reported a compiler error when using inheriting constructors
when using an unspecified environment. Investigation shows that gcc-6.x
has a regression that causes spurious -Wuseless-cast warnings where the
compiler automatically synthesizes a cast, then warns the user that the
synthesized cast is useless.
Compensate for this by extending the -Wuseless-cast testcase to provoke
this bug, if present. Affected users will lose -Wuseless-cast, but
their build will succeed.
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/316>
This allows the player to press a movement key to respawn after death, and the same keypress will cause the ship to move. Now this works with the option 'when dead, respawn by pressing any key' as well as 'when dead, respawn by pressing the Fire key'.
This is so game_flush_inputs() isn't called - part of change allowing player to respawn and begin moving with the same keypress. With this commit, you can use this feature with the 'when dead, respawn by pressing the Fire key' option - i.e. hold down movement key, then press fire key to respawn.
Later commits will enable the player to press a movement key to respawn on death, then move with the same keypress. This commit makes sure the player stops moving when the key is released.
Movement handling has an ugly hack that tries to grab powerups near the
console player, but it reuses general collision handling and fails to
check whether the player is alive.
Add a liveness check. Place the check so that it happens once, before
the objects are scanned, rather than being needlessly repeated for every
object.
Refactor the collision code to let the movement hack skip the parts it
does not need.
Reported-by: ryusei117 <https://github.com/dxx-rebirth/dxx-rebirth/issues/302#issuecomment-275816259>