Skip to content

Commit

Permalink
- transmit the actual run mode in BT_RUN, because BT_SPEED was poorly…
Browse files Browse the repository at this point in the history
… designed.
  • Loading branch information
coelckers committed Sep 26, 2020
1 parent f4c5a25 commit 399388d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/d_event.h
Expand Up @@ -90,6 +90,8 @@ typedef enum
BT_USER2 = 1<<22,
BT_USER3 = 1<<23,
BT_USER4 = 1<<24,

BT_RUN = 1<<25,
} buttoncode_t;

// Called by IO functions when input is detected.
Expand Down
1 change: 1 addition & 0 deletions src/g_game.cpp
Expand Up @@ -691,6 +691,7 @@ void G_BuildTiccmd (ticcmd_t *cmd)
if (buttonMap.ButtonDown(Button_MoveDown)) cmd->ucmd.buttons |= BT_MOVEDOWN;
if (buttonMap.ButtonDown(Button_MoveUp)) cmd->ucmd.buttons |= BT_MOVEUP;
if (buttonMap.ButtonDown(Button_ShowScores)) cmd->ucmd.buttons |= BT_SHOWSCORES;
if (speed) cmd->ucmd.buttons |= BT_RUN;

// Handle joysticks/game controllers.
float joyaxes[NUM_JOYAXIS];
Expand Down
2 changes: 2 additions & 0 deletions wadsrc/static/zscript/constants.zs
Expand Up @@ -821,6 +821,8 @@ enum EButtons
BT_USER2 = 1<<22,
BT_USER3 = 1<<23,
BT_USER4 = 1<<24,

BT_RUN = 1<<25,
};

// Flags for GetAngle
Expand Down

0 comments on commit 399388d

Please sign in to comment.