mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
p_mobj.c: add P_InstaScale function
Previously was in objects/broly.c
This commit is contained in:
parent
ffcdce339e
commit
c50e63ccd7
3 changed files with 12 additions and 7 deletions
|
|
@ -6,13 +6,6 @@
|
||||||
#include "../p_local.h"
|
#include "../p_local.h"
|
||||||
#include "../s_sound.h"
|
#include "../s_sound.h"
|
||||||
|
|
||||||
// TODO: generic function
|
|
||||||
static void P_InstaScale(mobj_t *thing, fixed_t scale)
|
|
||||||
{
|
|
||||||
P_SetScale(thing, scale);
|
|
||||||
thing->destscale = scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* An object may not be visible on the same tic:
|
/* An object may not be visible on the same tic:
|
||||||
1) that it spawned
|
1) that it spawned
|
||||||
2) that it cycles to the next state */
|
2) that it cycles to the next state */
|
||||||
|
|
|
||||||
11
src/p_mobj.c
11
src/p_mobj.c
|
|
@ -4954,6 +4954,17 @@ void P_SetScale(mobj_t *mobj, fixed_t newscale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_InstaScale
|
||||||
|
//
|
||||||
|
// Set the object's current scale and destscale together
|
||||||
|
//
|
||||||
|
void P_InstaScale(mobj_t *thing, fixed_t scale)
|
||||||
|
{
|
||||||
|
P_SetScale(thing, scale);
|
||||||
|
thing->destscale = scale;
|
||||||
|
}
|
||||||
|
|
||||||
void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on your target
|
void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on your target
|
||||||
{
|
{
|
||||||
fixed_t dist, ndist, speedmul;
|
fixed_t dist, ndist, speedmul;
|
||||||
|
|
|
||||||
|
|
@ -548,6 +548,7 @@ boolean P_PrecipThinker(precipmobj_t *mobj);
|
||||||
void P_NullPrecipThinker(precipmobj_t *mobj);
|
void P_NullPrecipThinker(precipmobj_t *mobj);
|
||||||
void P_FreePrecipMobj(precipmobj_t *mobj);
|
void P_FreePrecipMobj(precipmobj_t *mobj);
|
||||||
void P_SetScale(mobj_t *mobj, fixed_t newscale);
|
void P_SetScale(mobj_t *mobj, fixed_t newscale);
|
||||||
|
void P_InstaScale(mobj_t *mobj, fixed_t newscale);
|
||||||
void P_XYMovement(mobj_t *mo);
|
void P_XYMovement(mobj_t *mo);
|
||||||
void P_RingXYMovement(mobj_t *mo);
|
void P_RingXYMovement(mobj_t *mo);
|
||||||
void P_SceneryXYMovement(mobj_t *mo);
|
void P_SceneryXYMovement(mobj_t *mo);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue