mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Spindash averaging experiment. Much nicer - and clearly communicates the forcing of direction - a little better than the instant jump.
This commit is contained in:
parent
a684f2ee7b
commit
aa6f170daf
1 changed files with 11 additions and 2 deletions
13
src/p_user.c
13
src/p_user.c
|
@ -3761,7 +3761,7 @@ static void P_DoSpinDashDust(player_t *player)
|
||||||
prandom[2] = P_RandomFixed()<<3; // P_RandomByte()<<11
|
prandom[2] = P_RandomFixed()<<3; // P_RandomByte()<<11
|
||||||
P_SetObjectMomZ(particle, player->dashspeed/50 + prandom[0], false);
|
P_SetObjectMomZ(particle, player->dashspeed/50 + prandom[0], false);
|
||||||
P_InstaThrust(particle,
|
P_InstaThrust(particle,
|
||||||
player->mo->angle + (prandom[1]*ANG1),
|
player->drawangle + (prandom[1]*ANG1),
|
||||||
-FixedMul(player->dashspeed/12 + FRACUNIT + prandom[2], player->mo->scale));
|
-FixedMul(player->dashspeed/12 + FRACUNIT + prandom[2], player->mo->scale));
|
||||||
P_TryMove(particle, particle->x+particle->momx, particle->y+particle->momy, true);
|
P_TryMove(particle, particle->x+particle->momx, particle->y+particle->momy, true);
|
||||||
}
|
}
|
||||||
|
@ -9203,10 +9203,19 @@ void P_PlayerThink(player_t *player)
|
||||||
return; // P_MovePlayer removed player->mo.
|
return; // P_MovePlayer removed player->mo.
|
||||||
|
|
||||||
if ((player->climbing // stuff where the direction is forced at all times
|
if ((player->climbing // stuff where the direction is forced at all times
|
||||||
|| (player->pflags & (/*PF_JUMPED|*/PF_STARTDASH|PF_GLIDING|PF_SLIDING|PF_NIGHTSMODE)))
|
|| (player->pflags & (PF_GLIDING|PF_SLIDING|PF_NIGHTSMODE)))
|
||||||
|| P_AnalogMove(player) // keep things synchronised up there, since the camera IS seperate from player motion when that happens
|
|| P_AnalogMove(player) // keep things synchronised up there, since the camera IS seperate from player motion when that happens
|
||||||
|| G_RingSlingerGametype()) // no firing rings in directions your player isn't aiming
|
|| G_RingSlingerGametype()) // no firing rings in directions your player isn't aiming
|
||||||
player->drawangle = player->mo->angle;
|
player->drawangle = player->mo->angle;
|
||||||
|
else if (player->pflags & PF_STARTDASH) // fun spindash experiment
|
||||||
|
{
|
||||||
|
angle_t diff = (player->mo->angle - player->drawangle);
|
||||||
|
if (diff > ANGLE_180)
|
||||||
|
diff = InvAngle(InvAngle(diff)/4);
|
||||||
|
else
|
||||||
|
diff /= 4;
|
||||||
|
player->drawangle += diff;
|
||||||
|
}
|
||||||
else if (P_PlayerInPain(player))
|
else if (P_PlayerInPain(player))
|
||||||
;
|
;
|
||||||
else if (player->powers[pw_carry] && player->mo->tracer) // carry
|
else if (player->powers[pw_carry] && player->mo->tracer) // carry
|
||||||
|
|
Loading…
Reference in a new issue