mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-25 15:01:13 +00:00
Make hyu bob a static func
This commit is contained in:
parent
d19924d96d
commit
4404d0c098
1 changed files with 12 additions and 9 deletions
|
|
@ -117,6 +117,16 @@ sine_bob
|
|||
sineofs + FINESINE(a >> ANGLETOFINESHIFT));
|
||||
}
|
||||
|
||||
static void
|
||||
bob_in_place
|
||||
( mobj_t * hyu,
|
||||
INT32 bob_speed)
|
||||
{
|
||||
sine_bob(hyu,
|
||||
(leveltime & (bob_speed - 1)) *
|
||||
(ANGLE_MAX / bob_speed), -(3*FRACUNIT/4));
|
||||
}
|
||||
|
||||
static void
|
||||
project_hyudoro (mobj_t *hyu)
|
||||
{
|
||||
|
|
@ -143,8 +153,6 @@ project_hyudoro (mobj_t *hyu)
|
|||
static void
|
||||
project_hyudoro_hover (mobj_t *hyu)
|
||||
{
|
||||
const INT32 bob_speed = 64;
|
||||
|
||||
mobj_t *target = hyudoro_target(hyu);
|
||||
|
||||
// Turns a bit toward its target
|
||||
|
|
@ -170,9 +178,7 @@ project_hyudoro_hover (mobj_t *hyu)
|
|||
hyu->pitch = target->pitch;
|
||||
hyu->roll = target->roll;
|
||||
|
||||
sine_bob(hyu,
|
||||
(leveltime & (bob_speed - 1)) *
|
||||
(ANGLE_MAX / bob_speed), -(3*FRACUNIT/4));
|
||||
bob_in_place(hyu, 64);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -242,7 +248,6 @@ do_confused (mobj_t *hyu)
|
|||
{
|
||||
// Hyudoro is confused.
|
||||
// Spin around, try to find a new target.
|
||||
const INT32 bob_speed = 32;
|
||||
|
||||
if (hyudoro_delivered(hyu))
|
||||
{
|
||||
|
|
@ -258,9 +263,7 @@ do_confused (mobj_t *hyu)
|
|||
hyu->angle += ANGLE_45;
|
||||
|
||||
// Bob very fast
|
||||
sine_bob(hyu,
|
||||
(leveltime & (bob_speed - 1)) *
|
||||
(ANGLE_MAX / bob_speed), -(3*FRACUNIT/4));
|
||||
bob_in_place(hyu, 32);
|
||||
|
||||
hyu->sprzoff += hyu->height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue