mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'public_next' into master
This commit is contained in:
commit
398dbed4ed
5 changed files with 86 additions and 57 deletions
|
@ -1009,10 +1009,10 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
}
|
||||
if (cv_analog.value || twodlevel
|
||||
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|
||||
|| player->climbing
|
||||
|| (!demoplayback && (player->climbing
|
||||
|| (player->pflags & PF_NIGHTSMODE)
|
||||
|| (player->pflags & PF_SLIDING)
|
||||
|| (player->pflags & PF_FORCESTRAFE)) // Analog
|
||||
|| (player->pflags & PF_FORCESTRAFE)))) // Analog
|
||||
forcestrafe = true;
|
||||
if (forcestrafe) // Analog
|
||||
{
|
||||
|
@ -1184,8 +1184,9 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
if (!mouseaiming && cv_mousemove.value)
|
||||
forward += mousey;
|
||||
|
||||
if (cv_analog.value || player->climbing
|
||||
|| (player->pflags & PF_SLIDING)) // Analog for mouse
|
||||
if (cv_analog.value ||
|
||||
(!demoplayback && (player->climbing
|
||||
|| (player->pflags & PF_SLIDING)))) // Analog for mouse
|
||||
side += mousex*2;
|
||||
else
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*8));
|
||||
|
|
|
@ -169,6 +169,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius);
|
|||
void P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in p_user
|
||||
boolean P_SuperReady(player_t *player);
|
||||
void P_DoJump(player_t *player, boolean soundandstate);
|
||||
boolean P_AnalogMove(player_t *player);
|
||||
boolean P_TransferToNextMare(player_t *player);
|
||||
UINT8 P_FindLowestMare(void);
|
||||
void P_FindEmerald(void);
|
||||
|
|
33
src/p_map.c
33
src/p_map.c
|
@ -189,10 +189,13 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
{
|
||||
object->angle = spring->angle;
|
||||
|
||||
if (object->player == &players[consoleplayer])
|
||||
localangle = spring->angle;
|
||||
else if (object->player == &players[secondarydisplayplayer])
|
||||
localangle2 = spring->angle;
|
||||
if (!demoplayback || P_AnalogMove(object->player))
|
||||
{
|
||||
if (object->player == &players[consoleplayer])
|
||||
localangle = spring->angle;
|
||||
else if (object->player == &players[secondarydisplayplayer])
|
||||
localangle2 = spring->angle;
|
||||
}
|
||||
}
|
||||
|
||||
pflags = object->player->pflags & (PF_JUMPED|PF_SPINNING|PF_THOKKED); // I still need these.
|
||||
|
@ -672,10 +675,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
thing->angle = tmthing->angle;
|
||||
|
||||
if (thing->player == &players[consoleplayer])
|
||||
localangle = thing->angle;
|
||||
else if (thing->player == &players[secondarydisplayplayer])
|
||||
localangle2 = thing->angle;
|
||||
if (!demoplayback || P_AnalogMove(thing->player))
|
||||
{
|
||||
if (thing->player == &players[consoleplayer])
|
||||
localangle = thing->angle;
|
||||
else if (thing->player == &players[secondarydisplayplayer])
|
||||
localangle2 = thing->angle;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2666,10 +2672,13 @@ isblocking:
|
|||
&& P_IsClimbingValid(slidemo->player, climbangle))
|
||||
{
|
||||
slidemo->angle = climbangle;
|
||||
if (slidemo->player == &players[consoleplayer])
|
||||
localangle = slidemo->angle;
|
||||
else if (slidemo->player == &players[secondarydisplayplayer])
|
||||
localangle2 = slidemo->angle;
|
||||
if (!demoplayback || P_AnalogMove(slidemo->player))
|
||||
{
|
||||
if (slidemo->player == &players[consoleplayer])
|
||||
localangle = slidemo->angle;
|
||||
else if (slidemo->player == &players[secondarydisplayplayer])
|
||||
localangle2 = slidemo->angle;
|
||||
}
|
||||
|
||||
if (!slidemo->player->climbing)
|
||||
{
|
||||
|
|
46
src/p_spec.c
46
src/p_spec.c
|
@ -3670,10 +3670,13 @@ DoneSection2:
|
|||
|
||||
player->mo->angle = lineangle;
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
}
|
||||
|
||||
if (!(lines[i].flags & ML_EFFECT4))
|
||||
{
|
||||
|
@ -7500,24 +7503,27 @@ void T_Pusher(pusher_t *p)
|
|||
P_SetPlayerMobjState (thing, thing->info->painstate); // Whee!
|
||||
thing->angle = R_PointToAngle2 (0, 0, xspeed<<(FRACBITS-PUSH_FACTOR), yspeed<<(FRACBITS-PUSH_FACTOR));
|
||||
|
||||
if (thing->player == &players[consoleplayer])
|
||||
if (!demoplayback || P_AnalogMove(thing->player))
|
||||
{
|
||||
if (thing->angle - localangle > ANGLE_180)
|
||||
localangle -= (localangle - thing->angle) / 8;
|
||||
else
|
||||
localangle += (thing->angle - localangle) / 8;
|
||||
if (thing->player == &players[consoleplayer])
|
||||
{
|
||||
if (thing->angle - localangle > ANGLE_180)
|
||||
localangle -= (localangle - thing->angle) / 8;
|
||||
else
|
||||
localangle += (thing->angle - localangle) / 8;
|
||||
}
|
||||
else if (thing->player == &players[secondarydisplayplayer])
|
||||
{
|
||||
if (thing->angle - localangle2 > ANGLE_180)
|
||||
localangle2 -= (localangle2 - thing->angle) / 8;
|
||||
else
|
||||
localangle2 += (thing->angle - localangle2) / 8;
|
||||
}
|
||||
/*if (thing->player == &players[consoleplayer])
|
||||
localangle = thing->angle;
|
||||
else if (thing->player == &players[secondarydisplayplayer])
|
||||
localangle2 = thing->angle;*/
|
||||
}
|
||||
else if (thing->player == &players[secondarydisplayplayer])
|
||||
{
|
||||
if (thing->angle - localangle2 > ANGLE_180)
|
||||
localangle2 -= (localangle2 - thing->angle) / 8;
|
||||
else
|
||||
localangle2 += (thing->angle - localangle2) / 8;
|
||||
}
|
||||
/*if (thing->player == &players[consoleplayer])
|
||||
localangle = thing->angle;
|
||||
else if (thing->player == &players[secondarydisplayplayer])
|
||||
localangle2 = thing->angle;*/
|
||||
}
|
||||
|
||||
if (p->exclusive)
|
||||
|
|
54
src/p_user.c
54
src/p_user.c
|
@ -2700,10 +2700,13 @@ static void P_DoClimbing(player_t *player)
|
|||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
||||
}
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
}
|
||||
|
||||
if (player->climbing == 0)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
|
@ -3583,10 +3586,13 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
|
||||
player->mo->angle = player->mo->angle - ANGLE_180; // Turn around from the wall you were climbing.
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
}
|
||||
|
||||
player->climbing = 0; // Stop climbing, duh!
|
||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(6*FRACUNIT, player->mo->scale)); // Jump off the wall.
|
||||
|
@ -4242,7 +4248,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
}
|
||||
|
||||
static boolean P_AnalogMove(player_t *player)
|
||||
boolean P_AnalogMove(player_t *player)
|
||||
{
|
||||
return player->pflags & PF_ANALOGMODE;
|
||||
}
|
||||
|
@ -7577,7 +7583,7 @@ void P_HomingAttack(mobj_t *source, mobj_t *enemy) // Home in on your target
|
|||
|
||||
// change angle
|
||||
source->angle = R_PointToAngle2(source->x, source->y, enemy->x, enemy->y);
|
||||
if (source->player)
|
||||
if (source->player && (!demoplayback || P_AnalogMove(source->player)))
|
||||
{
|
||||
if (source->player == &players[consoleplayer])
|
||||
localangle = source->angle;
|
||||
|
@ -7996,6 +8002,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
angle = R_PointToAngle2(player->mo->x, player->mo->y, player->mo->target->x, player->mo->target->y);
|
||||
}
|
||||
}
|
||||
else if (P_AnalogMove(player)) // Analog
|
||||
angle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y);
|
||||
else if (demoplayback)
|
||||
{
|
||||
angle = focusangle;
|
||||
|
@ -8008,8 +8016,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
localangle -= abs((signed)(focusangle - localangle))>>5;
|
||||
}
|
||||
}
|
||||
else if (P_AnalogMove(player)) // Analog
|
||||
angle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y);
|
||||
else
|
||||
angle = focusangle + FixedAngle(camrotate*FRACUNIT);
|
||||
|
||||
|
@ -8020,7 +8026,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
thiscam->angle = angle;
|
||||
}
|
||||
|
||||
if (!objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && !(player->pflags & PF_NIGHTSMODE))
|
||||
if (!objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && !(player->pflags & PF_NIGHTSMODE) && displayplayer == consoleplayer)
|
||||
{
|
||||
#ifdef REDSANALOG
|
||||
if ((player->cmd.buttons & (BT_CAMLEFT|BT_CAMRIGHT)) == (BT_CAMLEFT|BT_CAMRIGHT)); else
|
||||
|
@ -9379,10 +9385,13 @@ void P_PlayerAfterThink(player_t *player)
|
|||
{
|
||||
player->mo->angle = player->mo->tracer->angle;
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
}
|
||||
}
|
||||
|
||||
if (P_AproxDistance(player->mo->x - player->mo->tracer->x, player->mo->y - player->mo->tracer->y) > player->mo->radius)
|
||||
|
@ -9449,10 +9458,13 @@ void P_PlayerAfterThink(player_t *player)
|
|||
player->mo->tracer->target->health += cmd->sidemove;
|
||||
player->mo->angle += cmd->sidemove<<ANGLETOFINESHIFT; // 2048 --> ANGLE_MAX
|
||||
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue