mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-10 16:52:16 +00:00
Landmine forwardthrow
This commit is contained in:
parent
de0d0d4fba
commit
42e30cd8bb
3 changed files with 24 additions and 5 deletions
|
|
@ -15051,7 +15051,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_LANDMINE_EXPLODE, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
128*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
|
|
|
|||
12
src/k_kart.c
12
src/k_kart.c
|
|
@ -6638,6 +6638,10 @@ mobj_t *K_ThrowKartItemEx(player_t *player, boolean missile, mobjtype_t mapthing
|
|||
mo->reactiontime = TICRATE/2;
|
||||
P_SetMobjState(mo, mo->info->painstate);
|
||||
}
|
||||
else if (mapthing == MT_LANDMINE && mo)
|
||||
{
|
||||
mo->reactiontime = TICRATE/2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -13582,7 +13586,13 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||
{
|
||||
player->itemamount--;
|
||||
K_ThrowLandMine(player);
|
||||
if (player->throwdir > 0)
|
||||
{
|
||||
mobj_t *landmine = K_ThrowKartItem(player, true, MT_LANDMINE, -1, 0, 0);
|
||||
}
|
||||
else {
|
||||
K_ThrowLandMine(player);
|
||||
}
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->botvars.itemconfirm = 0;
|
||||
}
|
||||
|
|
|
|||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -7421,8 +7421,6 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
mobj->threshold--;
|
||||
break;
|
||||
case MT_LANDMINE:
|
||||
mobj->friction = ORIG_FRICTION/4;
|
||||
|
||||
if (mobj->target && mobj->target->player)
|
||||
mobj->color = mobj->target->player->skincolor;
|
||||
else
|
||||
|
|
@ -7434,10 +7432,21 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
ghost->colorized = true; // already has color!
|
||||
}
|
||||
|
||||
if (mobj->reactiontime > 0)
|
||||
{
|
||||
mobj->friction = ((2*ORIG_FRICTION)+FRACUNIT)/3; // too low still?
|
||||
mobj->reactiontime--;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Time to stop, ramp up the friction...
|
||||
mobj->friction = ORIG_FRICTION/4; // too high still?
|
||||
}
|
||||
|
||||
if (P_IsObjectOnGround(mobj) && mobj->health > 1)
|
||||
{
|
||||
S_StartSound(mobj, mobj->info->activesound);
|
||||
mobj->momx = mobj->momy = 0;
|
||||
// mobj->momx = mobj->momy = 0;
|
||||
mobj->health = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue