A robot that is rendered may be woken later, subject to some conditions.
Move the easily checked conditions into the renderer, so that robots
which will not be woken are never recorded.
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
gcc and clang disagree about how to disambiguate when an identifier is
both a typename and a member. Avoid the disagreement by renaming the
member.
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/532>
endlevel wants to freeze the console player's last in-mine position.
Instead of copying the position out and back, refactor the flow to let
endlevel skip the update of the position.
Only the console player's last position needs to be remembered across
frames. Copy the console player's position out before processsing
object movement. For all other objects, retain a temporary for use by
the position recovery code.
Commit 0df57f5b0f changed markers' movement type from MT_NONE to
MT_SPINNING, since retail code assigned a spin rate, suggesting markers
were meant to spin. However, in some anarchy games, markers are used as
player-positioned cameras. Spinning the cameras makes them hard to use.
Resolve this by preventing markers from spinning in such games.
Fixes: 0df57f5b0f ("Fix retail bug that prevented marker spinning")
Reported-by: flpduarte <https://github.com/dxx-rebirth/dxx-rebirth/issues/456>
Zico's commit 38fabd7c49 open-coded a test for a robot smart mine. So
far, this is the only place it is needed, but others might arise. Move
the test and its comment out to a static helper function.
As documented in zico's commit 38fabd7c49, robot smart mines have a
different ID number than player smart mines. Rename the test functions
to clarify that they only recognize player smart mines, but not robot
smart mines.
git grep -l is_proximity_bomb_or_smart_mine | xargs sed -i -e 's/is_proximity_bomb_or_smart_mine/is_proximity_bomb_or_player_smart_mine/g'
This removes the need to walk all objects when creating a new one, since
each object can have a private generation counter, unaware of other
objects. For compatibility with demos, mix in the object's index when
writing the signature value.
Release builds should never have an object in CT_SLEW state. If they
do, they abort the program. This is an extreme reaction. Change the
logic to report the problem, then coerce the type to CT_NONE and try to
resume operation.