mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Tails ringslinger buff.
Any character with CA_FLY will now throw rings 1.5x as fast.
This commit is contained in:
parent
7118925959
commit
bed8dc4c7c
1 changed files with 8 additions and 4 deletions
12
src/p_mobj.c
12
src/p_mobj.c
|
@ -9534,7 +9534,7 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
|
|||
{
|
||||
mobj_t *th;
|
||||
angle_t an;
|
||||
fixed_t x, y, z, slope = 0;
|
||||
fixed_t x, y, z, slope = 0, speed;
|
||||
|
||||
// angle at which you fire, is player angle
|
||||
an = angle;
|
||||
|
@ -9566,9 +9566,13 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
|
|||
|
||||
P_SetTarget(&th->target, source);
|
||||
|
||||
speed = th->info->speed;
|
||||
if (source->player && source->player->charability == CA_FLY)
|
||||
speed = FixedMul(speed, 3*FRACUNIT/2);
|
||||
|
||||
th->angle = an;
|
||||
th->momx = FixedMul(th->info->speed, FINECOSINE(an>>ANGLETOFINESHIFT));
|
||||
th->momy = FixedMul(th->info->speed, FINESINE(an>>ANGLETOFINESHIFT));
|
||||
th->momx = FixedMul(speed, FINECOSINE(an>>ANGLETOFINESHIFT));
|
||||
th->momy = FixedMul(speed, FINESINE(an>>ANGLETOFINESHIFT));
|
||||
|
||||
if (allowaim)
|
||||
{
|
||||
|
@ -9576,7 +9580,7 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
|
|||
th->momy = FixedMul(th->momy,FINECOSINE(source->player->aiming>>ANGLETOFINESHIFT));
|
||||
}
|
||||
|
||||
th->momz = FixedMul(th->info->speed, slope);
|
||||
th->momz = FixedMul(speed, slope);
|
||||
|
||||
//scaling done here so it doesn't clutter up the code above
|
||||
th->momx = FixedMul(th->momx, th->scale);
|
||||
|
|
Loading…
Reference in a new issue