mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'bt_spin' into 'next'
Replace all occurances of BT_USE with BT_SPIN (2.2!) See merge request STJr/SRB2!982
This commit is contained in:
commit
3e8cf5ab06
15 changed files with 92 additions and 77 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)
|
||||
|
|
|
@ -115,7 +115,7 @@ typedef enum
|
|||
|
||||
// True if button down last tic.
|
||||
PF_ATTACKDOWN = 1<<7,
|
||||
PF_USEDOWN = 1<<8,
|
||||
PF_SPINDOWN = 1<<8,
|
||||
PF_JUMPDOWN = 1<<9,
|
||||
PF_WPNDOWN = 1<<10,
|
||||
|
||||
|
|
|
@ -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,
|
||||
BT_CAMLEFT = 1<<8, // turn camera left
|
||||
BT_CAMRIGHT = 1<<9, // turn camera right
|
||||
BT_TOSSFLAG = 1<<10,
|
||||
|
|
|
@ -9082,7 +9082,7 @@ static const char *const PLAYERFLAG_LIST[] = {
|
|||
|
||||
// True if button down last tic.
|
||||
"ATTACKDOWN",
|
||||
"USEDOWN",
|
||||
"SPINDOWN",
|
||||
"JUMPDOWN",
|
||||
"WPNDOWN",
|
||||
|
||||
|
@ -9969,7 +9969,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},
|
||||
{"BT_CAMLEFT",BT_CAMLEFT}, // turn camera left
|
||||
{"BT_CAMRIGHT",BT_CAMRIGHT}, // turn camera right
|
||||
{"BT_TOSSFLAG",BT_TOSSFLAG},
|
||||
|
@ -10842,6 +10842,12 @@ static inline int lib_getenum(lua_State *L)
|
|||
lua_pushinteger(L, (lua_Integer)PF_FULLSTASIS);
|
||||
return 1;
|
||||
}
|
||||
else if (fastcmp(p, "USEDOWN")) // Remove case when 2.3 nears release...
|
||||
{
|
||||
LUA_Deprecated(L, "PF_USEDOWN", "PF_SPINDOWN");
|
||||
lua_pushinteger(L, (lua_Integer)PF_SPINDOWN);
|
||||
return 1;
|
||||
}
|
||||
if (mathlib) return luaL_error(L, "playerflag '%s' could not be found.\n", word);
|
||||
return 0;
|
||||
}
|
||||
|
@ -11108,6 +11114,13 @@ static inline int lib_getenum(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (fastcmp(word, "BT_USE")) // Remove case when 2.3 nears release...
|
||||
{
|
||||
LUA_Deprecated(L, "BT_USE", "BT_SPIN");
|
||||
lua_pushinteger(L, (lua_Integer)BT_SPIN);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; INT_CONST[i].n; i++)
|
||||
if (fastcmp(word,INT_CONST[i].n)) {
|
||||
lua_pushinteger(L, INT_CONST[i].v);
|
||||
|
|
|
@ -4104,7 +4104,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;
|
||||
|
@ -4444,11 +4444,11 @@ static boolean F_GetTextPromptTutorialTag(char *tag, INT32 length)
|
|||
else if (!strncmp(tag, "TAJ", 3)) // Jump
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_jump, num_gcl_jump);
|
||||
else if (!strncmp(tag, "TAS", 3)) // Spin
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_use, num_gcl_use);
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_spin, num_gcl_spin);
|
||||
else if (!strncmp(tag, "TAA", 3)) // Char ability
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_jump, num_gcl_jump);
|
||||
else if (!strncmp(tag, "TAW", 3)) // Shield ability
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_jump_use, num_gcl_jump_use);
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_jump_spin, num_gcl_jump_spin);
|
||||
else
|
||||
gcs = G_GetControlScheme(gamecontrol, gcl_tutorial_used, num_gcl_tutorial_used);
|
||||
|
||||
|
@ -4705,7 +4705,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--;
|
||||
|
@ -4728,7 +4728,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)
|
||||
|
|
|
@ -1340,8 +1340,8 @@ 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;
|
||||
if (PLAYERINPUTDOWN(ssplayer, gc_spin) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_SPIN;
|
||||
|
||||
// Centerview can be a toggle in simple mode!
|
||||
{
|
||||
|
@ -2575,7 +2575,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
p->spheres = spheres;
|
||||
|
||||
// Don't do anything immediately
|
||||
p->pflags |= PF_USEDOWN;
|
||||
p->pflags |= PF_SPINDOWN;
|
||||
p->pflags |= PF_ATTACKDOWN;
|
||||
p->pflags |= PF_JUMPDOWN;
|
||||
|
||||
|
|
|
@ -57,13 +57,13 @@ const INT32 gcl_tutorial_check[num_gcl_tutorial_check] = {
|
|||
const INT32 gcl_tutorial_used[num_gcl_tutorial_used] = {
|
||||
gc_forward, gc_backward, gc_strafeleft, gc_straferight,
|
||||
gc_turnleft, gc_turnright,
|
||||
gc_jump, gc_use
|
||||
gc_jump, gc_spin
|
||||
};
|
||||
|
||||
const INT32 gcl_tutorial_full[num_gcl_tutorial_full] = {
|
||||
gc_forward, gc_backward, gc_strafeleft, gc_straferight,
|
||||
gc_lookup, gc_lookdown, gc_turnleft, gc_turnright, gc_centerview,
|
||||
gc_jump, gc_use,
|
||||
gc_jump, gc_spin,
|
||||
gc_fire, gc_firenormal
|
||||
};
|
||||
|
||||
|
@ -82,10 +82,10 @@ const INT32 gcl_movement_camera[num_gcl_movement_camera] = {
|
|||
|
||||
const INT32 gcl_jump[num_gcl_jump] = { gc_jump };
|
||||
|
||||
const INT32 gcl_use[num_gcl_use] = { gc_use };
|
||||
const INT32 gcl_spin[num_gcl_spin] = { gc_spin };
|
||||
|
||||
const INT32 gcl_jump_use[num_gcl_jump_use] = {
|
||||
gc_jump, gc_use
|
||||
const INT32 gcl_jump_spin[num_gcl_jump_spin] = {
|
||||
gc_jump, gc_spin
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
@ -583,7 +583,7 @@ static const char *gamecontrolname[num_gamecontrols] =
|
|||
"fire",
|
||||
"firenormal",
|
||||
"tossflag",
|
||||
"use",
|
||||
"spin",
|
||||
"camtoggle",
|
||||
"camreset",
|
||||
"lookup",
|
||||
|
@ -692,7 +692,7 @@ void G_DefineDefaultControls(void)
|
|||
gamecontroldefault[gcs_fps][gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontroldefault[gcs_fps][gc_centerview ][0] = KEY_END;
|
||||
gamecontroldefault[gcs_fps][gc_jump ][0] = KEY_SPACE;
|
||||
gamecontroldefault[gcs_fps][gc_use ][0] = KEY_LSHIFT;
|
||||
gamecontroldefault[gcs_fps][gc_spin ][0] = KEY_LSHIFT;
|
||||
gamecontroldefault[gcs_fps][gc_fire ][0] = KEY_RCTRL;
|
||||
gamecontroldefault[gcs_fps][gc_fire ][1] = KEY_MOUSE1+0;
|
||||
gamecontroldefault[gcs_fps][gc_firenormal ][0] = 'c';
|
||||
|
@ -708,7 +708,7 @@ void G_DefineDefaultControls(void)
|
|||
gamecontroldefault[gcs_platform][gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontroldefault[gcs_platform][gc_centerview ][0] = KEY_END;
|
||||
gamecontroldefault[gcs_platform][gc_jump ][0] = KEY_SPACE;
|
||||
gamecontroldefault[gcs_platform][gc_use ][0] = KEY_LSHIFT;
|
||||
gamecontroldefault[gcs_platform][gc_spin ][0] = KEY_LSHIFT;
|
||||
gamecontroldefault[gcs_platform][gc_fire ][0] = 's';
|
||||
gamecontroldefault[gcs_platform][gc_fire ][1] = KEY_MOUSE1+0;
|
||||
gamecontroldefault[gcs_platform][gc_firenormal ][0] = 'w';
|
||||
|
@ -743,7 +743,7 @@ void G_DefineDefaultControls(void)
|
|||
gamecontroldefault[i][gc_weaponnext ][1] = KEY_JOY1+1; // B
|
||||
gamecontroldefault[i][gc_weaponprev ][1] = KEY_JOY1+2; // X
|
||||
gamecontroldefault[i][gc_tossflag ][1] = KEY_JOY1+0; // A
|
||||
gamecontroldefault[i][gc_use ][1] = KEY_JOY1+4; // LB
|
||||
gamecontroldefault[i][gc_spin ][1] = KEY_JOY1+4; // LB
|
||||
gamecontroldefault[i][gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
gamecontroldefault[i][gc_camreset ][1] = KEY_JOY1+3; // Y
|
||||
gamecontroldefault[i][gc_centerview ][1] = KEY_JOY1+9; // Right Stick
|
||||
|
@ -758,7 +758,7 @@ void G_DefineDefaultControls(void)
|
|||
gamecontrolbisdefault[i][gc_weaponnext][0] = KEY_2JOY1+1; // B
|
||||
gamecontrolbisdefault[i][gc_weaponprev][0] = KEY_2JOY1+2; // X
|
||||
gamecontrolbisdefault[i][gc_tossflag ][0] = KEY_2JOY1+0; // A
|
||||
gamecontrolbisdefault[i][gc_use ][0] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbisdefault[i][gc_spin ][0] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbisdefault[i][gc_camreset ][0] = KEY_2JOY1+3; // Y
|
||||
gamecontrolbisdefault[i][gc_centerview][0] = KEY_2JOY1+9; // Right Stick
|
||||
gamecontrolbisdefault[i][gc_jump ][0] = KEY_2JOY1+5; // RB
|
||||
|
@ -890,7 +890,7 @@ static INT32 G_FilterKeyByVersion(INT32 numctrl, INT32 keyidx, INT32 player, INT
|
|||
|
||||
if (GETMAJOREXECVERSION(cv_execversion.value) < 27 && ( // v2.1.22
|
||||
numctrl == gc_weaponnext || numctrl == gc_weaponprev || numctrl == gc_tossflag ||
|
||||
numctrl == gc_use || numctrl == gc_camreset || numctrl == gc_jump ||
|
||||
numctrl == gc_spin || numctrl == gc_camreset || numctrl == gc_jump ||
|
||||
numctrl == gc_pause || numctrl == gc_systemmenu || numctrl == gc_camtoggle ||
|
||||
numctrl == gc_screenshot || numctrl == gc_talkkey || numctrl == gc_scores ||
|
||||
numctrl == gc_centerview
|
||||
|
@ -996,7 +996,9 @@ static void setcontrol(INT32 (*gc)[2])
|
|||
INT32 player = ((void*)gc == (void*)&gamecontrolbis ? 1 : 0);
|
||||
boolean nestedoverride = false;
|
||||
|
||||
namectrl = COM_Argv(1);
|
||||
// Update me for 2.3
|
||||
namectrl = (stricmp(COM_Argv(1), "use")) ? COM_Argv(1) : "spin";
|
||||
|
||||
for (numctrl = 0; numctrl < num_gamecontrols && stricmp(namectrl, gamecontrolname[numctrl]);
|
||||
numctrl++)
|
||||
;
|
||||
|
|
|
@ -80,7 +80,7 @@ typedef enum
|
|||
gc_fire,
|
||||
gc_firenormal,
|
||||
gc_tossflag,
|
||||
gc_use,
|
||||
gc_spin,
|
||||
gc_camtoggle,
|
||||
gc_camreset,
|
||||
gc_lookup,
|
||||
|
@ -141,8 +141,8 @@ extern INT32 gamecontrolbisdefault[num_gamecontrolschemes][num_gamecontrols][2];
|
|||
#define num_gcl_camera 2
|
||||
#define num_gcl_movement_camera 6
|
||||
#define num_gcl_jump 1
|
||||
#define num_gcl_use 1
|
||||
#define num_gcl_jump_use 2
|
||||
#define num_gcl_spin 1
|
||||
#define num_gcl_jump_spin 2
|
||||
|
||||
extern const INT32 gcl_tutorial_check[num_gcl_tutorial_check];
|
||||
extern const INT32 gcl_tutorial_used[num_gcl_tutorial_used];
|
||||
|
@ -151,8 +151,8 @@ extern const INT32 gcl_movement[num_gcl_movement];
|
|||
extern const INT32 gcl_camera[num_gcl_camera];
|
||||
extern const INT32 gcl_movement_camera[num_gcl_movement_camera];
|
||||
extern const INT32 gcl_jump[num_gcl_jump];
|
||||
extern const INT32 gcl_use[num_gcl_use];
|
||||
extern const INT32 gcl_jump_use[num_gcl_jump_use];
|
||||
extern const INT32 gcl_spin[num_gcl_spin];
|
||||
extern const INT32 gcl_jump_spin[num_gcl_jump_spin];
|
||||
|
||||
// peace to my little coder fingers!
|
||||
// check a gamecontrol being active or not
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1117,7 +1117,7 @@ static menuitem_t OP_ChangeControlsMenu[] =
|
|||
{IT_CALL | IT_STRING2, NULL, "Move Left", M_ChangeControl, gc_strafeleft },
|
||||
{IT_CALL | IT_STRING2, NULL, "Move Right", M_ChangeControl, gc_straferight },
|
||||
{IT_CALL | IT_STRING2, NULL, "Jump", M_ChangeControl, gc_jump },
|
||||
{IT_CALL | IT_STRING2, NULL, "Spin", M_ChangeControl, gc_use },
|
||||
{IT_CALL | IT_STRING2, NULL, "Spin", M_ChangeControl, gc_spin },
|
||||
{IT_HEADER, NULL, "Camera", NULL, 0},
|
||||
{IT_SPACE, NULL, NULL, NULL, 0}, // padding
|
||||
{IT_CALL | IT_STRING2, NULL, "Look Up", M_ChangeControl, gc_lookup },
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5019,7 +5019,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])
|
||||
|
|
74
src/p_user.c
74
src/p_user.c
|
@ -665,7 +665,7 @@ static void P_DeNightserizePlayer(player_t *player)
|
|||
player->powers[pw_carry] = CR_NIGHTSFALL;
|
||||
|
||||
player->powers[pw_underwater] = 0;
|
||||
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_STARTJUMP|PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED|PF_SPINNING|PF_DRILLING|PF_TRANSFERTOCLOSEST);
|
||||
player->pflags &= ~(PF_SPINDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_STARTJUMP|PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED|PF_SPINNING|PF_DRILLING|PF_TRANSFERTOCLOSEST);
|
||||
player->secondjump = 0;
|
||||
player->homing = 0;
|
||||
player->climbing = 0;
|
||||
|
@ -795,7 +795,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
}
|
||||
}
|
||||
|
||||
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED|PF_SHIELDABILITY|PF_SPINNING|PF_DRILLING);
|
||||
player->pflags &= ~(PF_SPINDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED|PF_SHIELDABILITY|PF_SPINNING|PF_DRILLING);
|
||||
player->homing = 0;
|
||||
player->mo->fuse = 0;
|
||||
player->speed = 0;
|
||||
|
@ -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,20 +4591,20 @@ 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)
|
||||
&& !player->mo->momz && onground && !(player->pflags & (PF_USEDOWN|PF_SPINNING))
|
||||
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_SPINDOWN|PF_SPINNING))
|
||||
&& canstand)
|
||||
{
|
||||
player->mo->momx = player->cmomx;
|
||||
player->mo->momy = player->cmomy;
|
||||
player->pflags |= (PF_USEDOWN|PF_STARTDASH|PF_SPINNING);
|
||||
player->pflags |= (PF_SPINDOWN|PF_STARTDASH|PF_SPINNING);
|
||||
player->dashspeed = player->mindash;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPINDASH);
|
||||
if (!player->spectator)
|
||||
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,18 +4637,18 @@ 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)))
|
||||
|| !canstand) && !(player->pflags & (PF_SPINDOWN|PF_SPINNING)))
|
||||
{
|
||||
player->pflags |= (PF_USEDOWN|PF_SPINNING);
|
||||
player->pflags |= (PF_SPINDOWN|PF_SPINNING);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
if (!player->spectator)
|
||||
S_StartSound(player->mo, sfx_spin);
|
||||
}
|
||||
else
|
||||
// Catapult the player from a spindash rev!
|
||||
if (onground && !(player->pflags & PF_USEDOWN) && (player->pflags & PF_STARTDASH) && (player->pflags & PF_SPINNING))
|
||||
if (onground && !(player->pflags & PF_SPINDOWN) && (player->pflags & PF_STARTDASH) && (player->pflags & PF_SPINNING))
|
||||
{
|
||||
player->pflags &= ~PF_STARTDASH;
|
||||
if (player->powers[pw_carry] == CR_BRAKGOOP)
|
||||
|
@ -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_SPINDOWN))
|
||||
{
|
||||
mobj_t *bullet;
|
||||
|
||||
|
@ -4719,15 +4719,15 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
player->mo->momx >>= 1;
|
||||
player->mo->momy >>= 1;
|
||||
player->pflags |= PF_USEDOWN;
|
||||
player->pflags |= PF_SPINDOWN;
|
||||
P_SetWeaponDelay(player, TICRATE/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CA2_MELEE: // Melee attack
|
||||
if (player->panim != PA_ABILITY2 && (cmd->buttons & BT_USE)
|
||||
&& !player->mo->momz && onground && !(player->pflags & PF_USEDOWN)
|
||||
if (player->panim != PA_ABILITY2 && (cmd->buttons & BT_SPIN)
|
||||
&& !player->mo->momz && onground && !(player->pflags & PF_SPINDOWN)
|
||||
&& canstand)
|
||||
{
|
||||
P_ResetPlayer(player);
|
||||
|
@ -4767,7 +4767,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
P_SetPlayerMobjState(player->mo, S_PLAY_MELEE);
|
||||
S_StartSound(player->mo, sfx_s3k42);
|
||||
}
|
||||
player->pflags |= PF_USEDOWN;
|
||||
player->pflags |= PF_SPINDOWN;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -5040,7 +5040,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
;
|
||||
else if (player->pflags & (PF_GLIDING|PF_SLIDING|PF_SHIELDABILITY)) // If the player has used an ability previously
|
||||
;
|
||||
else if ((player->powers[pw_shield] & SH_NOSTACK) && !player->powers[pw_super] && !(player->pflags & PF_USEDOWN)
|
||||
else if ((player->powers[pw_shield] & SH_NOSTACK) && !player->powers[pw_super] && !(player->pflags & PF_SPINDOWN)
|
||||
&& ((!(player->pflags & PF_THOKKED) || ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP && player->secondjump == UINT8_MAX)))) // thokked is optional if you're bubblewrapped
|
||||
{
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT)
|
||||
|
@ -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,9 +5140,9 @@ 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))
|
||||
if (!(player->pflags & PF_SPINDOWN) && P_SuperReady(player))
|
||||
{
|
||||
// If you can turn super and aren't already,
|
||||
// and you don't have a shield, do it!
|
||||
|
@ -5172,7 +5172,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
break;
|
||||
case CA_TELEKINESIS:
|
||||
if (!(player->pflags & (PF_THOKKED|PF_USEDOWN)) || (player->charflags & SF_MULTIABILITY))
|
||||
if (!(player->pflags & (PF_THOKKED|PF_SPINDOWN)) || (player->charflags & SF_MULTIABILITY))
|
||||
{
|
||||
P_Telekinesis(player,
|
||||
-FixedMul(player->actionspd, player->mo->scale), // -ve thrust (pulling towards player)
|
||||
|
@ -5180,7 +5180,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
break;
|
||||
case CA_TWINSPIN:
|
||||
if ((player->charability2 == CA2_MELEE) && (!(player->pflags & (PF_THOKKED|PF_USEDOWN)) || player->charflags & SF_MULTIABILITY))
|
||||
if ((player->charability2 == CA2_MELEE) && (!(player->pflags & (PF_THOKKED|PF_SPINDOWN)) || player->charflags & SF_MULTIABILITY))
|
||||
P_DoTwinSpin(player);
|
||||
break;
|
||||
default:
|
||||
|
@ -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);
|
||||
|
@ -8457,7 +8457,7 @@ 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)
|
||||
|
@ -8821,9 +8821,9 @@ 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);
|
||||
player->pflags |= (P_GetJumpFlags(player)|PF_SPINDOWN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
|
@ -9476,7 +9476,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
|
||||
|
@ -11010,7 +11010,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
|
||||
|
@ -11687,7 +11687,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;
|
||||
}
|
||||
|
@ -12057,10 +12057,10 @@ void P_PlayerThink(player_t *player)
|
|||
// check for use
|
||||
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||
{
|
||||
if (cmd->buttons & BT_USE)
|
||||
player->pflags |= PF_USEDOWN;
|
||||
if (cmd->buttons & BT_SPIN)
|
||||
player->pflags |= PF_SPINDOWN;
|
||||
else
|
||||
player->pflags &= ~PF_USEDOWN;
|
||||
player->pflags &= ~PF_SPINDOWN;
|
||||
}
|
||||
|
||||
// IF PLAYER NOT HERE THEN FLASH END IF
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1009,7 +1009,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
|
||||
|
@ -1086,7 +1086,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