mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
MT_SEALEDSTAR_BUMPER: use A_GenericBumper
This commit is contained in:
parent
29234d8f20
commit
465387c69e
4 changed files with 2 additions and 59 deletions
|
|
@ -3640,7 +3640,7 @@ state_t states[NUMSTATES] =
|
|||
{SPR_S_SP, FF_ANIMATE|FF_SEMIBRIGHT, -1, {NULL}, 3, 2, S_NULL}, // S_SLSTMACE
|
||||
|
||||
// MT_SEALEDSTAR_BUMPER
|
||||
{SPR_SBMP, 0|FF_FULLBRIGHT, -1, {NULL}, 2, 8, S_SEALEDSTAR_BUMPER}, // S_SEALEDSTAR_BUMPER
|
||||
{SPR_SBMP, 0|FF_FULLBRIGHT, -1, {A_GenericBumper}, 0, 56, S_SEALEDSTAR_BUMPER}, // S_SEALEDSTAR_BUMPER
|
||||
{SPR_SBMP, 1|FF_ANIMATE|FF_FULLBRIGHT, 8, {NULL}, 1, 2, S_SEALEDSTAR_BUMPER}, // S_SEALEDSTAR_BUMPERHIT
|
||||
|
||||
// MT_SSCHAIN_SPAWNER
|
||||
|
|
@ -22233,7 +22233,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SPECIAL|MF_NOGRAVITY, // flags
|
||||
MF_NOGRAVITY|MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
{ // MT_SSCHAIN_SPAWNER
|
||||
|
|
|
|||
|
|
@ -411,7 +411,6 @@ void Obj_SSGobletMobjThink(mobj_t* mo);
|
|||
void Obj_SSLampMapThingSpawn(mobj_t* mo, mapthing_t* mt);
|
||||
void Obj_SSWindowMapThingSpawn(mobj_t* mo, mapthing_t* mt);
|
||||
void Obj_SLSTMaceMobjThink(mobj_t* mo);
|
||||
void Obj_SSBumperTouchSpecial(mobj_t* special, mobj_t* toucher);
|
||||
void Obj_SSBumperMobjSpawn(mobj_t* mo);
|
||||
void Obj_SSChainMobjThink(mobj_t* mo);
|
||||
void Obj_SSGachaTargetMobjSpawn(mobj_t* mo);
|
||||
|
|
|
|||
|
|
@ -542,58 +542,6 @@ void Obj_SLSTMaceMobjThink(mobj_t* mo)
|
|||
}
|
||||
}
|
||||
|
||||
#define BUMPER_STRENGTH (56)
|
||||
|
||||
void Obj_SSBumperTouchSpecial(mobj_t* special, mobj_t* toucher)
|
||||
{
|
||||
angle_t hang;
|
||||
angle_t vang;
|
||||
fixed_t str;
|
||||
int i;
|
||||
|
||||
hang = R_PointToAngle2(special->x, special->y, toucher->x, toucher->y);
|
||||
vang = 0;
|
||||
|
||||
if (P_IsObjectOnGround(toucher) == false)
|
||||
{
|
||||
vang = R_PointToAngle2(
|
||||
FixedHypot(special->x, special->y), special->z + (special->height >> 1),
|
||||
FixedHypot(toucher->x, toucher->y), toucher->z + (toucher->height >> 1)
|
||||
);
|
||||
}
|
||||
|
||||
str = (BUMPER_STRENGTH * special->scale) >> 1;
|
||||
|
||||
toucher->momx = FixedMul(FixedMul(str, FCOS(hang)), abs(FCOS(vang)));
|
||||
toucher->momy = FixedMul(FixedMul(str, FSIN(hang)), abs(FCOS(vang)));
|
||||
toucher->momz = FixedMul(str, FSIN(vang));
|
||||
|
||||
if (toucher->player)
|
||||
{
|
||||
if (toucher->player->tiregrease == 0)
|
||||
{
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
mobj_t *grease = P_SpawnMobjFromMobj(toucher, 0, 0, 0, MT_TIREGREASE);
|
||||
P_SetTarget(&grease->target, toucher);
|
||||
grease->angle = toucher->angle;
|
||||
grease->extravalue1 = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (toucher->player->tiregrease < 2*TICRATE) // greasetics
|
||||
{
|
||||
toucher->player->tiregrease = 2*TICRATE;
|
||||
}
|
||||
}
|
||||
|
||||
if (special->state != &states[special->info->seestate])
|
||||
{
|
||||
S_StartSound(special, special->info->deathsound);
|
||||
P_SetMobjState(special, special->info->seestate);
|
||||
}
|
||||
}
|
||||
|
||||
void Obj_SSBumperMobjSpawn(mobj_t* mo)
|
||||
{
|
||||
mo->shadowscale = FRACUNIT;
|
||||
|
|
|
|||
|
|
@ -1083,10 +1083,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
Obj_TrickBalloonTouchSpecial(special, toucher);
|
||||
return;
|
||||
|
||||
case MT_SEALEDSTAR_BUMPER:
|
||||
Obj_SSBumperTouchSpecial(special, toucher);
|
||||
return;
|
||||
|
||||
case MT_PULLUPHOOK:
|
||||
Obj_PulleyHookTouch(special, toucher);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue