mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 13:55:36 -04:00
do not allow direct SSG switches in Vanilla demos (#1824)
Fixes desync in b109xm-00463.lmp
This commit is contained in:
parent
24bbf539b3
commit
012162d8ba
@ -93,7 +93,7 @@ typedef enum
|
||||
BT_CHANGE = 4,
|
||||
|
||||
// The 4bit weapon mask and shift, convenience.
|
||||
//BT_WEAPONMASK = (8+16+32),
|
||||
BT_WEAPONMASK_OLD = (8+16+32),
|
||||
BT_WEAPONMASK = (8+16+32+64), // extended to pick up SSG // phares
|
||||
BT_WEAPONSHIFT = 3,
|
||||
|
||||
|
@ -100,8 +100,10 @@ static void TicToHudCmd(hud_cmd_t *hud_cmd, const ticcmd_t *cmd)
|
||||
|
||||
if (cmd->buttons & BT_CHANGE)
|
||||
{
|
||||
const int bt_weaponmask = demo_compatibility ?
|
||||
BT_WEAPONMASK_OLD : BT_WEAPONMASK;
|
||||
hud_cmd->change =
|
||||
1 + ((cmd->buttons & BT_WEAPONMASK) >> BT_WEAPONSHIFT);
|
||||
1 + ((cmd->buttons & bt_weaponmask) >> BT_WEAPONSHIFT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -482,6 +482,7 @@ void P_PlayerThink (player_t* player)
|
||||
|
||||
if (demo_compatibility)
|
||||
{ // compatibility mode -- required for old demos -- killough
|
||||
newweapon = (cmd->buttons & BT_WEAPONMASK_OLD) >> BT_WEAPONSHIFT;
|
||||
if (newweapon == wp_fist && player->weaponowned[wp_chainsaw] &&
|
||||
(player->readyweapon != wp_chainsaw ||
|
||||
!player->powers[pw_strength]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user