mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +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_LANDMINE_EXPLODE, // deathstate
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_None, // deathsound
|
||||||
0, // speed
|
128*FRACUNIT, // speed
|
||||||
24*FRACUNIT, // radius
|
24*FRACUNIT, // radius
|
||||||
32*FRACUNIT, // height
|
32*FRACUNIT, // height
|
||||||
0, // display offset
|
0, // display offset
|
||||||
|
|
|
||||||
10
src/k_kart.c
10
src/k_kart.c
|
|
@ -6638,6 +6638,10 @@ mobj_t *K_ThrowKartItemEx(player_t *player, boolean missile, mobjtype_t mapthing
|
||||||
mo->reactiontime = TICRATE/2;
|
mo->reactiontime = TICRATE/2;
|
||||||
P_SetMobjState(mo, mo->info->painstate);
|
P_SetMobjState(mo, mo->info->painstate);
|
||||||
}
|
}
|
||||||
|
else if (mapthing == MT_LANDMINE && mo)
|
||||||
|
{
|
||||||
|
mo->reactiontime = TICRATE/2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -13582,7 +13586,13 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
|
||||||
{
|
{
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
|
if (player->throwdir > 0)
|
||||||
|
{
|
||||||
|
mobj_t *landmine = K_ThrowKartItem(player, true, MT_LANDMINE, -1, 0, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
K_ThrowLandMine(player);
|
K_ThrowLandMine(player);
|
||||||
|
}
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->botvars.itemconfirm = 0;
|
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--;
|
mobj->threshold--;
|
||||||
break;
|
break;
|
||||||
case MT_LANDMINE:
|
case MT_LANDMINE:
|
||||||
mobj->friction = ORIG_FRICTION/4;
|
|
||||||
|
|
||||||
if (mobj->target && mobj->target->player)
|
if (mobj->target && mobj->target->player)
|
||||||
mobj->color = mobj->target->player->skincolor;
|
mobj->color = mobj->target->player->skincolor;
|
||||||
else
|
else
|
||||||
|
|
@ -7434,10 +7432,21 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
ghost->colorized = true; // already has color!
|
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)
|
if (P_IsObjectOnGround(mobj) && mobj->health > 1)
|
||||||
{
|
{
|
||||||
S_StartSound(mobj, mobj->info->activesound);
|
S_StartSound(mobj, mobj->info->activesound);
|
||||||
mobj->momx = mobj->momy = 0;
|
// mobj->momx = mobj->momy = 0;
|
||||||
mobj->health = 1;
|
mobj->health = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue