for (pnr = 0; pnr < MAX_PLAYERS; pnr++)
{
byte key_action = 0;
+ byte key_snap_action = 0;
if (setup.input[pnr].use_joystick)
continue;
{
ssi = setup.shortcut;
+ // also remember normal snap key when handling snap+direction keys
+ key_snap_action |= key_action & JOY_BUTTON_SNAP;
+
for (i = 0; i < NUM_DIRECTIONS; i++)
+ {
if (key == *key_info[i].key_snap)
- key_action |= key_info[i].action | JOY_BUTTON_SNAP;
+ {
+ key_action |= key_info[i].action | JOY_BUTTON_SNAP;
+ key_snap_action |= key_info[i].action;
+ }
+ }
}
if (key_status == KEY_PRESSED)
- stored_player[pnr].action |= key_action;
+ {
+ stored_player[pnr].action |= key_action;
+ stored_player[pnr].snap_action |= key_snap_action;
+ }
else
- stored_player[pnr].action &= ~key_action;
+ {
+ stored_player[pnr].action &= ~key_action;
+ stored_player[pnr].snap_action &= ~key_snap_action;
+ }
+
+ // restore snap action if one of several pressed snap keys was released
+ if (stored_player[pnr].snap_action)
+ stored_player[pnr].action |= JOY_BUTTON_SNAP;
if (tape.single_step && tape.recording && tape.pausing && !tape.use_mouse)
{
player->action = 0;
player->effective_action = 0;
player->programmed_action = 0;
+ player->snap_action = 0;
player->mouse_action.lx = 0;
player->mouse_action.ly = 0;
devices when in single player mode */
byte programmed_action; /* action forced by game itself (like moving
through doors); overrides other actions */
+ byte snap_action; // action from TAS snap keys
struct MouseActionInfo mouse_action; // (used by MM engine only)
struct MouseActionInfo effective_mouse_action; // (used by MM engine only)