mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Replace all occurances of BT_USE with BT_SPIN (2.3?)
I'd use `next-major` but it doesn't exist lol
This commit is contained in:
parent
84373b1726
commit
465ad1a7bc
11 changed files with 36 additions and 36 deletions
|
@ -193,7 +193,7 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd)
|
|||
{
|
||||
cmd->forwardmove = pcmd->forwardmove;
|
||||
cmd->sidemove = pcmd->sidemove;
|
||||
if (pcmd->buttons & BT_USE)
|
||||
if (pcmd->buttons & BT_SPIN)
|
||||
{
|
||||
spin = true;
|
||||
jump = false;
|
||||
|
@ -441,7 +441,7 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
|
|||
if (jump)
|
||||
cmd->buttons |= BT_JUMP;
|
||||
if (spin)
|
||||
cmd->buttons |= BT_USE;
|
||||
cmd->buttons |= BT_SPIN;
|
||||
}
|
||||
|
||||
void B_MoveBlocked(player_t *player)
|
||||
|
|
|
@ -31,7 +31,7 @@ typedef enum
|
|||
BT_WEAPONPREV = 1<<5,
|
||||
|
||||
BT_ATTACK = 1<<6, // shoot rings
|
||||
BT_USE = 1<<7, // spin
|
||||
BT_SPIN = 1<<7, // spin
|
||||
BT_CAMLEFT = 1<<8, // turn camera left
|
||||
BT_CAMRIGHT = 1<<9, // turn camera right
|
||||
BT_TOSSFLAG = 1<<10,
|
||||
|
|
|
@ -9938,7 +9938,7 @@ struct {
|
|||
{"BT_WEAPONNEXT",BT_WEAPONNEXT},
|
||||
{"BT_WEAPONPREV",BT_WEAPONPREV},
|
||||
{"BT_ATTACK",BT_ATTACK}, // shoot rings
|
||||
{"BT_USE",BT_USE}, // spin
|
||||
{"BT_SPIN",BT_SPIN}, // spin
|
||||
{"BT_CAMLEFT",BT_CAMLEFT}, // turn camera left
|
||||
{"BT_CAMRIGHT",BT_CAMRIGHT}, // turn camera right
|
||||
{"BT_TOSSFLAG",BT_TOSSFLAG},
|
||||
|
|
|
@ -4097,7 +4097,7 @@ void F_CutsceneTicker(void)
|
|||
if (netgame && i != serverplayer && !IsPlayerAdmin(i))
|
||||
continue;
|
||||
|
||||
if (players[i].cmd.buttons & BT_USE)
|
||||
if (players[i].cmd.buttons & BT_SPIN)
|
||||
{
|
||||
keypressed = false;
|
||||
cutscene_boostspeed = 1;
|
||||
|
@ -4698,7 +4698,7 @@ void F_TextPromptTicker(void)
|
|||
else
|
||||
continue;
|
||||
|
||||
if ((players[i].cmd.buttons & BT_USE) || (players[i].cmd.buttons & BT_JUMP))
|
||||
if ((players[i].cmd.buttons & BT_SPIN) || (players[i].cmd.buttons & BT_JUMP))
|
||||
{
|
||||
if (timetonext > 1)
|
||||
timetonext--;
|
||||
|
@ -4721,7 +4721,7 @@ void F_TextPromptTicker(void)
|
|||
}
|
||||
keypressed = true; // prevent repeat events
|
||||
}
|
||||
else if (!(players[i].cmd.buttons & BT_USE) && !(players[i].cmd.buttons & BT_JUMP))
|
||||
else if (!(players[i].cmd.buttons & BT_SPIN) && !(players[i].cmd.buttons & BT_JUMP))
|
||||
keypressed = false;
|
||||
|
||||
if (!splitscreen)
|
||||
|
|
|
@ -1341,7 +1341,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
// use with any button/key
|
||||
axis = PlayerJoyAxis(ssplayer, AXISSPIN);
|
||||
if (PLAYERINPUTDOWN(ssplayer, gc_use) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_USE;
|
||||
cmd->buttons |= BT_SPIN;
|
||||
|
||||
// Centerview can be a toggle in simple mode!
|
||||
{
|
||||
|
|
|
@ -1144,7 +1144,7 @@ void OP_NightsObjectplace(player_t *player)
|
|||
if (player->pflags & PF_ATTACKDOWN)
|
||||
{
|
||||
// Are ANY objectplace buttons pressed? If no, remove flag.
|
||||
if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_USE|BT_WEAPONNEXT|BT_WEAPONPREV)))
|
||||
if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_SPIN|BT_WEAPONNEXT|BT_WEAPONPREV)))
|
||||
player->pflags &= ~PF_ATTACKDOWN;
|
||||
|
||||
// Do nothing.
|
||||
|
@ -1251,7 +1251,7 @@ void OP_NightsObjectplace(player_t *player)
|
|||
}
|
||||
|
||||
// This places a custom object as defined in the console cv_mapthingnum.
|
||||
if (cmd->buttons & BT_USE)
|
||||
if (cmd->buttons & BT_SPIN)
|
||||
{
|
||||
UINT16 angle;
|
||||
|
||||
|
@ -1306,7 +1306,7 @@ void OP_ObjectplaceMovement(player_t *player)
|
|||
|
||||
if (cmd->buttons & BT_JUMP)
|
||||
player->mo->z += FRACUNIT*cv_speed.value;
|
||||
else if (cmd->buttons & BT_USE)
|
||||
else if (cmd->buttons & BT_SPIN)
|
||||
player->mo->z -= FRACUNIT*cv_speed.value;
|
||||
|
||||
if (cmd->forwardmove != 0)
|
||||
|
|
|
@ -380,7 +380,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
if ((spring->info->painchance == 3))
|
||||
{
|
||||
if (!(pflags = (object->player->pflags & PF_SPINNING)) &&
|
||||
(((object->player->charability2 == CA2_SPINDASH) && (object->player->cmd.buttons & BT_USE))
|
||||
(((object->player->charability2 == CA2_SPINDASH) && (object->player->cmd.buttons & BT_SPIN))
|
||||
|| (spring->flags2 & MF2_AMBUSH)))
|
||||
{
|
||||
pflags = PF_SPINNING;
|
||||
|
|
|
@ -5000,7 +5000,7 @@ DoneSection2:
|
|||
if (player->mo->momz > 0)
|
||||
break;
|
||||
|
||||
if (player->cmd.buttons & BT_USE)
|
||||
if (player->cmd.buttons & BT_SPIN)
|
||||
break;
|
||||
|
||||
if (!(player->pflags & PF_SLIDING) && player->mo->state == &states[player->mo->info->painstate])
|
||||
|
|
40
src/p_user.c
40
src/p_user.c
|
@ -2303,7 +2303,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
if (dorollstuff)
|
||||
{
|
||||
if ((player->charability2 == CA2_SPINDASH) && !((player->pflags & (PF_SPINNING|PF_THOKKED)) == PF_THOKKED) && !(player->charability == CA_THOK && player->secondjump)
|
||||
&& (player->cmd.buttons & BT_USE) && (FixedHypot(player->mo->momx, player->mo->momy) > (5*player->mo->scale)))
|
||||
&& (player->cmd.buttons & BT_SPIN) && (FixedHypot(player->mo->momx, player->mo->momy) > (5*player->mo->scale)))
|
||||
player->pflags = (player->pflags|PF_SPINNING) & ~PF_THOKKED;
|
||||
else if (!(player->pflags & PF_STARTDASH))
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
|
@ -2368,7 +2368,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
}
|
||||
}
|
||||
else if (player->charability2 == CA2_MELEE
|
||||
&& ((player->panim == PA_ABILITY2) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY && player->cmd.buttons & (BT_JUMP|BT_USE))))
|
||||
&& ((player->panim == PA_ABILITY2) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY && player->cmd.buttons & (BT_JUMP|BT_SPIN))))
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_MELEE_LANDING)
|
||||
{
|
||||
|
@ -3576,7 +3576,7 @@ static void P_DoClimbing(player_t *player)
|
|||
else if ((!(player->mo->momx || player->mo->momy || player->mo->momz) || !climb) && player->mo->state-states != S_PLAY_CLING)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_CLING);
|
||||
|
||||
if (cmd->buttons & BT_USE && !(player->pflags & PF_JUMPSTASIS))
|
||||
if (cmd->buttons & BT_SPIN && !(player->pflags & PF_JUMPSTASIS))
|
||||
{
|
||||
player->climbing = 0;
|
||||
player->pflags |= P_GetJumpFlags(player);
|
||||
|
@ -4574,7 +4574,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
&& (player->pflags & PF_JUMPSTASIS || player->mo->state-states != S_PLAY_GLIDE_LANDING))
|
||||
return;
|
||||
|
||||
if (cmd->buttons & BT_USE)
|
||||
if (cmd->buttons & BT_SPIN)
|
||||
{
|
||||
if (LUAh_SpinSpecial(player))
|
||||
return;
|
||||
|
@ -4591,7 +4591,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
case CA2_SPINDASH: // Spinning and Spindashing
|
||||
// Start revving
|
||||
if ((cmd->buttons & BT_USE) && (player->speed < FixedMul(5<<FRACBITS, player->mo->scale) || player->mo->state - states == S_PLAY_GLIDE_LANDING)
|
||||
if ((cmd->buttons & BT_SPIN) && (player->speed < FixedMul(5<<FRACBITS, player->mo->scale) || player->mo->state - states == S_PLAY_GLIDE_LANDING)
|
||||
&& !player->mo->momz && onground && !(player->pflags & (PF_USEDOWN|PF_SPINNING))
|
||||
&& canstand)
|
||||
{
|
||||
|
@ -4604,7 +4604,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
S_StartSound(player->mo, sfx_spndsh); // Make the rev sound!
|
||||
}
|
||||
// Revving
|
||||
else if ((cmd->buttons & BT_USE) && (player->pflags & PF_STARTDASH))
|
||||
else if ((cmd->buttons & BT_SPIN) && (player->pflags & PF_STARTDASH))
|
||||
{
|
||||
if (player->speed > 5*player->mo->scale)
|
||||
{
|
||||
|
@ -4637,7 +4637,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
// If not moving up or down, and travelling faster than a speed of five while not holding
|
||||
// down the spin button and not spinning.
|
||||
// AKA Just go into a spin on the ground, you idiot. ;)
|
||||
else if ((cmd->buttons & BT_USE || ((twodlevel || (player->mo->flags2 & MF2_TWOD)) && cmd->forwardmove < -20))
|
||||
else if ((cmd->buttons & BT_SPIN || ((twodlevel || (player->mo->flags2 & MF2_TWOD)) && cmd->forwardmove < -20))
|
||||
&& !player->climbing && !player->mo->momz && onground && (player->speed > FixedMul(5<<FRACBITS, player->mo->scale)
|
||||
|| !canstand) && !(player->pflags & (PF_USEDOWN|PF_SPINNING)))
|
||||
{
|
||||
|
@ -4690,7 +4690,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
P_SetTarget(&visual->target, lockon);
|
||||
}
|
||||
}
|
||||
if ((cmd->buttons & BT_USE) && !(player->pflags & PF_USEDOWN))
|
||||
if ((cmd->buttons & BT_SPIN) && !(player->pflags & PF_USEDOWN))
|
||||
{
|
||||
mobj_t *bullet;
|
||||
|
||||
|
@ -4726,7 +4726,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
break;
|
||||
case CA2_MELEE: // Melee attack
|
||||
if (player->panim != PA_ABILITY2 && (cmd->buttons & BT_USE)
|
||||
if (player->panim != PA_ABILITY2 && (cmd->buttons & BT_SPIN)
|
||||
&& !player->mo->momz && onground && !(player->pflags & PF_USEDOWN)
|
||||
&& canstand)
|
||||
{
|
||||
|
@ -5066,7 +5066,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (cmd->buttons & BT_USE && !LUAh_ShieldSpecial(player)) // Spin button effects
|
||||
if (cmd->buttons & BT_SPIN && !LUAh_ShieldSpecial(player)) // Spin button effects
|
||||
{
|
||||
// Force stop
|
||||
if ((player->powers[pw_shield] & ~(SH_FORCEHP|SH_STACK)) == SH_FORCE)
|
||||
|
@ -5140,7 +5140,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ((cmd->buttons & BT_USE))
|
||||
else if ((cmd->buttons & BT_SPIN))
|
||||
{
|
||||
if (!(player->pflags & PF_USEDOWN) && P_SuperReady(player))
|
||||
{
|
||||
|
@ -5193,7 +5193,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
if (player->pflags & PF_JUMPED)
|
||||
{
|
||||
if (cmd->buttons & BT_USE && player->secondjump < 42) // speed up falling down
|
||||
if (cmd->buttons & BT_SPIN && player->secondjump < 42) // speed up falling down
|
||||
player->secondjump++;
|
||||
|
||||
if (player->flyangle > 0 && player->pflags & PF_THOKKED)
|
||||
|
@ -6188,7 +6188,7 @@ static void P_SpectatorMovement(player_t *player)
|
|||
|
||||
if (cmd->buttons & BT_JUMP)
|
||||
player->mo->z += FRACUNIT*16;
|
||||
else if (cmd->buttons & BT_USE)
|
||||
else if (cmd->buttons & BT_SPIN)
|
||||
player->mo->z -= FRACUNIT*16;
|
||||
|
||||
if (player->mo->z > player->mo->ceilingz - player->mo->height)
|
||||
|
@ -7410,7 +7410,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
// No more bumper braking
|
||||
if (!player->bumpertime
|
||||
&& ((cmd->buttons & (BT_CAMLEFT|BT_CAMRIGHT)) == (BT_CAMLEFT|BT_CAMRIGHT)
|
||||
|| (cmd->buttons & BT_USE)))
|
||||
|| (cmd->buttons & BT_SPIN)))
|
||||
{
|
||||
if (!(player->pflags & PF_STARTDASH))
|
||||
S_StartSound(player->mo, sfx_ngskid);
|
||||
|
@ -8464,7 +8464,7 @@ static void P_MovePlayer(player_t *player)
|
|||
S_StartSound(player->mo, sfx_putput);
|
||||
|
||||
// Descend
|
||||
if (cmd->buttons & BT_USE && !(player->pflags & PF_STASIS) && !player->exiting && !(player->mo->eflags & MFE_GOOWATER))
|
||||
if (cmd->buttons & BT_SPIN && !(player->pflags & PF_STASIS) && !player->exiting && !(player->mo->eflags & MFE_GOOWATER))
|
||||
if (P_MobjFlip(player->mo)*player->mo->momz > -FixedMul(5*actionspd, player->mo->scale))
|
||||
{
|
||||
if (player->fly1 > 2)
|
||||
|
@ -8828,7 +8828,7 @@ static void P_DoRopeHang(player_t *player)
|
|||
player->mo->momy = FixedMul(FixedDiv(player->mo->tracer->y - player->mo->y, dist), (speed));
|
||||
player->mo->momz = FixedMul(FixedDiv(player->mo->tracer->z - playerz, dist), (speed));
|
||||
|
||||
if (player->cmd.buttons & BT_USE && !(player->pflags & PF_STASIS)) // Drop off of the rope
|
||||
if (player->cmd.buttons & BT_SPIN && !(player->pflags & PF_STASIS)) // Drop off of the rope
|
||||
{
|
||||
player->pflags |= (P_GetJumpFlags(player)|PF_USEDOWN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
|
@ -9483,7 +9483,7 @@ static void P_DeathThink(player_t *player)
|
|||
// continue logic
|
||||
if (!(netgame || multiplayer) && player->lives <= 0)
|
||||
{
|
||||
if (player->deadtimer > (3*TICRATE) && (cmd->buttons & BT_USE || cmd->buttons & BT_JUMP) && (!continuesInSession || player->continues > 0))
|
||||
if (player->deadtimer > (3*TICRATE) && (cmd->buttons & BT_SPIN || cmd->buttons & BT_JUMP) && (!continuesInSession || player->continues > 0))
|
||||
G_UseContinue();
|
||||
else if (player->deadtimer >= gameovertics)
|
||||
G_UseContinue(); // Even if we don't have one this handles ending the game
|
||||
|
@ -11017,7 +11017,7 @@ static void P_MinecartThink(player_t *player)
|
|||
else if (detright && player->cmd.sidemove > 0)
|
||||
sidelock = detright;
|
||||
|
||||
//if (player->cmd.buttons & BT_USE && currentSpeed > 4*FRACUNIT)
|
||||
//if (player->cmd.buttons & BT_SPIN && currentSpeed > 4*FRACUNIT)
|
||||
// currentSpeed -= FRACUNIT/8;
|
||||
|
||||
// Jumping
|
||||
|
@ -11694,7 +11694,7 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
if ((gametyperules & GTR_RACE) && leveltime < 4*TICRATE)
|
||||
{
|
||||
cmd->buttons &= BT_USE; // Remove all buttons except BT_USE
|
||||
cmd->buttons &= BT_SPIN; // Remove all buttons except BT_SPIN
|
||||
cmd->forwardmove = 0;
|
||||
cmd->sidemove = 0;
|
||||
}
|
||||
|
@ -12064,7 +12064,7 @@ void P_PlayerThink(player_t *player)
|
|||
// check for use
|
||||
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if (cmd->buttons & BT_USE)
|
||||
if (cmd->buttons & BT_SPIN)
|
||||
player->pflags |= PF_USEDOWN;
|
||||
else
|
||||
player->pflags &= ~PF_USEDOWN;
|
||||
|
|
|
@ -1126,7 +1126,7 @@ static void ST_drawInput(void)
|
|||
V_DrawCharacter(x+16+1+(xoffs), y+1+(yoffs)-offs, hudinfo[HUD_LIVES].f|symb, false)
|
||||
|
||||
drawbutt( 4,-3, BT_JUMP, 'J');
|
||||
drawbutt(15,-3, BT_USE, 'S');
|
||||
drawbutt(15,-3, BT_SPIN, 'S');
|
||||
|
||||
V_DrawFill(x+16+4, y+8, 21, 10, hudinfo[HUD_LIVES].f|20); // sundial backing
|
||||
if (stplyr->mo)
|
||||
|
|
|
@ -1017,7 +1017,7 @@ void Y_Ticker(void)
|
|||
return;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && (players[i].cmd.buttons & BT_USE))
|
||||
if (playeringame[i] && (players[i].cmd.buttons & BT_SPIN))
|
||||
skip = true;
|
||||
|
||||
// bonuses count down by 222 each tic
|
||||
|
@ -1094,7 +1094,7 @@ void Y_Ticker(void)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i])
|
||||
{
|
||||
if (players[i].cmd.buttons & BT_USE)
|
||||
if (players[i].cmd.buttons & BT_SPIN)
|
||||
skip = true;
|
||||
if (players[i].charflags & SF_SUPER)
|
||||
super = true;
|
||||
|
|
Loading…
Reference in a new issue