mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Balloon: bob at random phase
This commit is contained in:
parent
dd22ef5c88
commit
50f8db9f4d
1 changed files with 11 additions and 0 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
|
@ -10286,6 +10286,14 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case MT_BALLOON:
|
||||||
|
{
|
||||||
|
fixed_t sine = FixedMul(16 * FSIN((M_TAU_FIXED * (4*TICRATE)) * (leveltime + mobj->extravalue2)), mobj->scale);
|
||||||
|
|
||||||
|
mobj->z = (mobj->extravalue1 - (16 * mobj->scale)) + sine;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// check mobj against possible water content, before movement code
|
// check mobj against possible water content, before movement code
|
||||||
P_MobjCheckWater(mobj);
|
P_MobjCheckWater(mobj);
|
||||||
|
|
@ -11435,6 +11443,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
};
|
};
|
||||||
|
|
||||||
mobj->color = BALLOONCOLORS[P_RandomKey(PR_DECORATION, sizeof(BALLOONCOLORS))];
|
mobj->color = BALLOONCOLORS[P_RandomKey(PR_DECORATION, sizeof(BALLOONCOLORS))];
|
||||||
|
|
||||||
|
mobj->extravalue1 = mobj->z;
|
||||||
|
mobj->extravalue2 = P_RandomRange(PR_DECORATION, 0, 4*TICRATE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_POGOSPRING:
|
case MT_POGOSPRING:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue