mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Bubble Shield updatin's
- Bigger hitbox - Waves start smaller, grow up the old size near the end of the inflation - Waves follow the shield slightly better - Bubble Shield gives more base weight (this may not actually impact anything) - Reduced slowdown from bubble trap - Recoded bubble reflecting to ignore player held shield items - Added more sound effects - Increased Bubble max size
This commit is contained in:
parent
02bd05ff2b
commit
26065e9983
6 changed files with 191 additions and 188 deletions
|
|
@ -16012,7 +16012,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SPECIAL|MF_NOCLIP|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
|
||||
MF_SOLID|MF_NOCLIP|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
@ -16060,7 +16060,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
8, // speed
|
||||
20*FRACUNIT, // radius
|
||||
28*FRACUNIT, // radius
|
||||
56*FRACUNIT, // height
|
||||
1, // display offset
|
||||
16, // mass
|
||||
|
|
|
|||
60
src/k_kart.c
60
src/k_kart.c
|
|
@ -1298,6 +1298,31 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
//{ SRB2kart p_user.c Stuff
|
||||
|
||||
static fixed_t K_PlayerWeight(mobj_t *mobj, mobj_t *against)
|
||||
{
|
||||
fixed_t weight = 5*mobj->scale;
|
||||
|
||||
if (!mobj->player)
|
||||
return weight;
|
||||
|
||||
if (against && !P_MobjWasRemoved(against) && against->player
|
||||
&& ((!against->player->kartstuff[k_spinouttimer] && mobj->player->kartstuff[k_spinouttimer]) // You're in spinout
|
||||
|| (against->player->kartstuff[k_itemtype] == KITEM_BUBBLESHIELD && mobj->player->kartstuff[k_itemtype] != KITEM_BUBBLESHIELD))) // They have a Bubble Shield
|
||||
{
|
||||
weight = 0; // This player does not cause any bump action
|
||||
}
|
||||
else
|
||||
{
|
||||
weight = (mobj->player->kartweight) * mobj->scale;
|
||||
if (mobj->player->speed > K_GetKartSpeed(mobj->player, false))
|
||||
weight += (mobj->player->speed - K_GetKartSpeed(mobj->player, false))/8;
|
||||
if (mobj->player->kartstuff[k_itemtype] == KITEM_BUBBLESHIELD)
|
||||
weight += 9*mobj->scale;
|
||||
}
|
||||
|
||||
return weight;
|
||||
}
|
||||
|
||||
static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
||||
{
|
||||
fixed_t weight = 5*mobj->scale;
|
||||
|
|
@ -1307,40 +1332,32 @@ static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
|||
case MT_PLAYER:
|
||||
if (!mobj->player)
|
||||
break;
|
||||
if (against->player
|
||||
&& ((!against->player->kartstuff[k_spinouttimer] && mobj->player->kartstuff[k_spinouttimer])
|
||||
|| (against->player->kartstuff[k_itemtype] == KITEM_BUBBLESHIELD && mobj->player->kartstuff[k_itemtype] != KITEM_BUBBLESHIELD)
|
||||
|| (against->type == MT_BUBBLESHIELD)))
|
||||
weight = 0; // This player does not cause any bump action
|
||||
else
|
||||
{
|
||||
weight = (mobj->player->kartweight) * mobj->scale;
|
||||
if (mobj->player->speed > K_GetKartSpeed(mobj->player, false))
|
||||
weight += (mobj->player->speed - K_GetKartSpeed(mobj->player, false))/8;
|
||||
}
|
||||
weight = K_PlayerWeight(mobj, against);
|
||||
break;
|
||||
case MT_BUBBLESHIELD:
|
||||
weight = K_PlayerWeight(mobj->target, against);
|
||||
break;
|
||||
case MT_FALLINGROCK:
|
||||
if (against->player)
|
||||
{
|
||||
if (against->player->kartstuff[k_invincibilitytimer]
|
||||
|| against->player->kartstuff[k_growshrinktimer] > 0)
|
||||
if (against->player->kartstuff[k_invincibilitytimer] || against->player->kartstuff[k_growshrinktimer] > 0)
|
||||
weight = 0;
|
||||
else
|
||||
weight = (against->player->kartweight) * against->scale;
|
||||
weight = K_PlayerWeight(against, NULL);
|
||||
}
|
||||
break;
|
||||
case MT_ORBINAUT:
|
||||
case MT_ORBINAUT_SHIELD:
|
||||
if (against->player)
|
||||
weight = (against->player->kartweight) * against->scale;
|
||||
weight = K_PlayerWeight(against, NULL);
|
||||
break;
|
||||
case MT_JAWZ:
|
||||
case MT_JAWZ_DUD:
|
||||
case MT_JAWZ_SHIELD:
|
||||
if (against->player)
|
||||
weight = (against->player->kartweight+3) * against->scale;
|
||||
weight = K_PlayerWeight(against, NULL) + (3*against->scale);
|
||||
else
|
||||
weight = 8*mobj->scale;
|
||||
weight += 3*mobj->scale;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -6460,18 +6477,19 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
if (player->kartstuff[k_holdready])
|
||||
{
|
||||
if (player->kartstuff[k_bubbleblowup] == 0)
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
S_StartSound(player->mo, sfx_s3k75);
|
||||
player->kartstuff[k_bubbleblowup]++;
|
||||
player->kartstuff[k_bubblecool] = TICRATE+bubbletime;
|
||||
if (player->kartstuff[k_bubbleblowup] > bubbletime)
|
||||
{
|
||||
mobj_t *trap = P_SpawnMobj(player->mo->x + player->mo->momx, player->mo->y + player->mo->momy, player->mo->z + player->mo->momz, MT_BUBBLESHIELDTRAP);
|
||||
P_SetScale(trap, (5*trap->destscale)>>1);
|
||||
P_SetScale(trap, ((5*trap->destscale)>>2)*4);
|
||||
trap->destscale = (5*trap->destscale)>>2;
|
||||
P_SetTarget(&trap->target, player->mo);
|
||||
trap->threshold = 10;
|
||||
S_StartSound(player->mo, sfx_s3k44);
|
||||
trap->threshold = TICRATE;
|
||||
S_StartSound(trap, sfx_s3kbfl);
|
||||
|
||||
K_PlayAttackTaunt(player->mo);
|
||||
player->kartstuff[k_bubbleblowup] = 0;
|
||||
player->kartstuff[k_itemamount]--;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -676,19 +676,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
case MT_BALLOON: // SRB2kart
|
||||
P_SetObjectMomZ(toucher, 20<<FRACBITS, false);
|
||||
break;
|
||||
case MT_BUBBLESHIELD:
|
||||
if (special->target == toucher)
|
||||
return;
|
||||
|
||||
if (special->health <= 0 || toucher->health <= 0)
|
||||
return;
|
||||
|
||||
if (player->spectator)
|
||||
return;
|
||||
|
||||
if (special->target->player && special->target->player->kartstuff[k_bubbleblowup])
|
||||
K_SpinPlayer(player, special->target, 0, special, false);
|
||||
return;
|
||||
case MT_BUBBLESHIELDTRAP:
|
||||
if ((special->target == toucher || special->target == toucher->target) && (special->threshold > 0))
|
||||
return;
|
||||
|
|
@ -719,10 +706,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
// attach to player!
|
||||
P_SetTarget(&special->tracer, toucher);
|
||||
toucher->flags |= MF_NOGRAVITY;
|
||||
toucher->momx = (4*toucher->momx)/5; // Huge initial speed cut
|
||||
toucher->momy = (4*toucher->momy)/5;
|
||||
toucher->momx = (15*toucher->momx)/16; // Huge initial speed cut
|
||||
toucher->momy = (15*toucher->momy)/16;
|
||||
toucher->momz = (8*toucher->scale) * P_MobjFlip(toucher);
|
||||
//S_StartSound(special, sfx_s1a2);
|
||||
S_StartSound(toucher, sfx_s1b2);
|
||||
return;
|
||||
|
||||
// ***************************************** //
|
||||
|
|
|
|||
216
src/p_map.c
216
src/p_map.c
|
|
@ -723,6 +723,110 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (tmthing->type == MT_RANDOMITEM)
|
||||
return true;
|
||||
|
||||
// Bubble Shield reflect
|
||||
if (((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (thing->player && thing->player->kartstuff[k_bubbleblowup]))
|
||||
&& (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|
||||
|| tmthing->type == MT_BANANA || tmthing->type == MT_EGGMANITEM || tmthing->type == MT_BALLHOG
|
||||
|| tmthing->type == MT_SSMINE || tmthing->type == MT_SINK
|
||||
|| (tmthing->type == MT_PLAYER && thing->target != tmthing)))
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
return true; // overhead
|
||||
if (tmthing->z + tmthing->height < thing->z)
|
||||
return true; // underneath
|
||||
|
||||
if (tmthing->type == MT_PLAYER)
|
||||
{
|
||||
if (tmthing->player->kartstuff[k_spinouttimer] || tmthing->player->kartstuff[k_squishedtimer]
|
||||
|| tmthing->player->powers[pw_flashing] || tmthing->player->kartstuff[k_hyudorotimer]
|
||||
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (mapobjectscale/8))
|
||||
return true;
|
||||
|
||||
// Player Damage
|
||||
P_DamageMobj(tmthing, thing, ((thing->type == MT_BUBBLESHIELD) ? thing->target : thing), 1);
|
||||
K_KartBouncing(tmthing, thing, false, true);
|
||||
S_StartSound(thing, sfx_s3k44);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!tmthing->threshold)
|
||||
{
|
||||
if (!tmthing->momx && !tmthing->momy)
|
||||
{
|
||||
tmthing->momz += (24*tmthing->scale) * P_MobjFlip(tmthing);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmthing->momx = -tmthing->momx;
|
||||
tmthing->momy = -tmthing->momy;
|
||||
tmthing->momz = -tmthing->momz;
|
||||
}
|
||||
if (tmthing->type == MT_JAWZ)
|
||||
P_SetTarget(&tmthing->tracer, tmthing->target); // Back to the source!
|
||||
tmthing->threshold = 10;
|
||||
S_StartSound(thing, sfx_s3k44);
|
||||
}
|
||||
}
|
||||
|
||||
// no interaction
|
||||
return true;
|
||||
}
|
||||
else if (((tmthing->type == MT_BUBBLESHIELD && tmthing->target->player && tmthing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (tmthing->player && tmthing->player->kartstuff[k_bubbleblowup]))
|
||||
&& (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||
|| thing->type == MT_BANANA || thing->type == MT_EGGMANITEM || thing->type == MT_BALLHOG
|
||||
|| thing->type == MT_SSMINE || thing->type == MT_SINK
|
||||
|| (thing->type == MT_PLAYER && tmthing->target != thing)))
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
return true; // overhead
|
||||
if (tmthing->z + tmthing->height < thing->z)
|
||||
return true; // underneath
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
if (thing->player->kartstuff[k_spinouttimer] || thing->player->kartstuff[k_squishedtimer]
|
||||
|| thing->player->powers[pw_flashing] || thing->player->kartstuff[k_hyudorotimer]
|
||||
|| thing->player->kartstuff[k_justbumped] || thing->scale > tmthing->scale + (mapobjectscale/8))
|
||||
return true;
|
||||
|
||||
// Player Damage
|
||||
P_DamageMobj(thing, tmthing, ((tmthing->type == MT_BUBBLESHIELD) ? tmthing->target : tmthing), 1);
|
||||
K_KartBouncing(thing, tmthing, false, true);
|
||||
S_StartSound(tmthing, sfx_s3k44);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!thing->threshold)
|
||||
{
|
||||
if (!thing->momx && !thing->momy)
|
||||
{
|
||||
thing->momz += (24*thing->scale) * P_MobjFlip(thing);
|
||||
}
|
||||
else
|
||||
{
|
||||
thing->momx = -thing->momx;
|
||||
thing->momy = -thing->momy;
|
||||
thing->momz = -thing->momz;
|
||||
}
|
||||
if (thing->type == MT_JAWZ)
|
||||
P_SetTarget(&thing->tracer, thing->target); // Back to the source!
|
||||
thing->threshold = 10;
|
||||
S_StartSound(tmthing, sfx_s3k44);
|
||||
}
|
||||
}
|
||||
|
||||
// no interaction
|
||||
return true;
|
||||
}
|
||||
|
||||
// double make sure bubbles won't collide with anything else
|
||||
if (thing->type == MT_BUBBLESHIELD || tmthing->type == MT_BUBBLESHIELD)
|
||||
return true;
|
||||
|
||||
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|
||||
|| tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
||||
{
|
||||
|
|
@ -750,29 +854,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->player && thing->player->kartstuff[k_hyudorotimer])
|
||||
return true; // no interaction
|
||||
|
||||
if ((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (thing->player && thing->player->kartstuff[k_bubbleblowup]))
|
||||
{
|
||||
if (!tmthing->threshold)
|
||||
{
|
||||
if (!tmthing->momx && !tmthing->momy)
|
||||
{
|
||||
tmthing->momz = (32*tmthing->scale) * P_MobjFlip(tmthing);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmthing->momx = -tmthing->momx;
|
||||
tmthing->momy = -tmthing->momy;
|
||||
tmthing->momz = -tmthing->momz;
|
||||
}
|
||||
if (tmthing->type == MT_JAWZ)
|
||||
P_SetTarget(&tmthing->tracer, tmthing->target); // Back to the source!
|
||||
tmthing->threshold = 10;
|
||||
S_StartSound(tmthing, sfx_s3k44);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
// Player Damage
|
||||
|
|
@ -874,27 +955,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->player && thing->player->powers[pw_flashing])
|
||||
return true;
|
||||
|
||||
if ((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (thing->player && thing->player->kartstuff[k_bubbleblowup]))
|
||||
{
|
||||
if (!tmthing->threshold)
|
||||
{
|
||||
if (!tmthing->momx && !tmthing->momy)
|
||||
{
|
||||
tmthing->momz = (32*tmthing->scale) * P_MobjFlip(tmthing);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmthing->momx = -tmthing->momx;
|
||||
tmthing->momy = -tmthing->momy;
|
||||
tmthing->momz = -tmthing->momz;
|
||||
}
|
||||
tmthing->threshold = 10;
|
||||
S_StartSound(tmthing, sfx_s3k44);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
S_StartSound(NULL, sfx_bsnipe); //let all players hear it.
|
||||
|
|
@ -957,27 +1017,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->player && thing->player->powers[pw_flashing])
|
||||
return true;
|
||||
|
||||
if ((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (thing->player && thing->player->kartstuff[k_bubbleblowup]))
|
||||
{
|
||||
if (!tmthing->threshold)
|
||||
{
|
||||
if (!tmthing->momx && !tmthing->momy)
|
||||
{
|
||||
tmthing->momz = (32*tmthing->scale) * P_MobjFlip(tmthing);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmthing->momx = -tmthing->momx;
|
||||
tmthing->momy = -tmthing->momy;
|
||||
tmthing->momz = -tmthing->momz;
|
||||
}
|
||||
tmthing->threshold = 10;
|
||||
S_StartSound(tmthing, sfx_s3k44);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
// Banana snipe!
|
||||
|
|
@ -1050,28 +1089,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->player && thing->player->powers[pw_flashing])
|
||||
return true;
|
||||
|
||||
// Bubble Shield reflect
|
||||
if ((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (thing->player && thing->player->kartstuff[k_bubbleblowup]))
|
||||
{
|
||||
if (!tmthing->threshold)
|
||||
{
|
||||
if (!tmthing->momx && !tmthing->momy)
|
||||
{
|
||||
tmthing->momz = (32*tmthing->scale) * P_MobjFlip(tmthing);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmthing->momx = -tmthing->momx;
|
||||
tmthing->momy = -tmthing->momy;
|
||||
tmthing->momz = -tmthing->momz;
|
||||
}
|
||||
tmthing->threshold = 10;
|
||||
S_StartSound(tmthing, sfx_s3k44);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
// Bomb punting
|
||||
|
|
@ -1123,31 +1140,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (tmthing->player && tmthing->player->kartstuff[k_hyudorotimer]) // I thought about doing this for just the objects below but figured it should apply to everything.
|
||||
return true; // no interaction
|
||||
|
||||
// Bubble Shield reflect
|
||||
if (((tmthing->type == MT_BUBBLESHIELD && tmthing->target->player && tmthing->target->player->kartstuff[k_bubbleblowup])
|
||||
|| (tmthing->player && tmthing->player->kartstuff[k_bubbleblowup]))
|
||||
&& (thing->type != MT_MINEEXPLOSION))
|
||||
{
|
||||
if (!thing->threshold)
|
||||
{
|
||||
if (!thing->momx && !thing->momy)
|
||||
{
|
||||
thing->momz = (32*thing->scale) * P_MobjFlip(thing);
|
||||
}
|
||||
else
|
||||
{
|
||||
thing->momx = -thing->momx;
|
||||
thing->momy = -thing->momy;
|
||||
thing->momz = -thing->momz;
|
||||
}
|
||||
if (thing->type == MT_JAWZ)
|
||||
P_SetTarget(&thing->tracer, thing->target); // Back to the source!
|
||||
thing->threshold = 10;
|
||||
S_StartSound(thing, sfx_s3k44);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
||||
|| thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)
|
||||
{
|
||||
|
|
|
|||
70
src/p_mobj.c
70
src/p_mobj.c
|
|
@ -6227,24 +6227,25 @@ void P_RunShadows(void)
|
|||
|| (!(mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z < floorz))
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
|
||||
rad = mobj->info->radius;
|
||||
rad = mobj->target->radius;
|
||||
|
||||
switch (mobj->type)
|
||||
switch (mobj->target->type)
|
||||
{
|
||||
case MT_FLOATINGITEM:
|
||||
rad /= 3;
|
||||
break;
|
||||
case MT_THUNDERSHIELD:
|
||||
case MT_BUBBLESHIELD:
|
||||
case MT_BUBBLESHIELDTRAP:
|
||||
case MT_FLAMESHIELD:
|
||||
rad = 10<<FRACBITS;
|
||||
rad = 20*mobj->target->scale;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// First scale to the same radius
|
||||
P_SetScale(mobj, FixedDiv(mobj->target->radius, rad));
|
||||
P_SetScale(mobj, FixedDiv(rad, mobj->info->radius));
|
||||
|
||||
dest = mobj->target;
|
||||
|
||||
|
|
@ -8383,7 +8384,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->destscale)>>2));
|
||||
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->scale)>>2));
|
||||
|
||||
if (!splitscreen /*&& rendermode != render_soft*/)
|
||||
{
|
||||
|
|
@ -8425,7 +8426,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
return;
|
||||
}
|
||||
|
||||
scale = (5*mobj->target->destscale)>>2;
|
||||
scale = (5*mobj->target->scale)>>2;
|
||||
curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states)));
|
||||
|
||||
if (mobj->target->player->kartstuff[k_bubbleblowup])
|
||||
|
|
@ -8437,7 +8438,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
|
||||
mobj->angle += ANGLE_22h;
|
||||
mobj->flags2 &= ~MF2_SHADOW;
|
||||
scale += (blow * (scale<<1)) / bubbletime;
|
||||
scale += (blow * (3*scale)) / bubbletime;
|
||||
|
||||
mobj->frame = (states[S_BUBBLESHIELDBLOWUP].frame + mobj->extravalue1);
|
||||
|
||||
|
|
@ -8453,28 +8454,30 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
|
||||
if (P_IsObjectOnGround(mobj->target))
|
||||
{
|
||||
mobj_t *wave;
|
||||
UINT8 i;
|
||||
|
||||
wave = P_SpawnMobj(
|
||||
mobj->target->x + P_ReturnThrustX(NULL, mobj->angle, mobj->radius),
|
||||
mobj->target->y + P_ReturnThrustY(NULL, mobj->angle, mobj->radius),
|
||||
mobj->target->z, MT_THOK);
|
||||
wave->flags &= ~(MF_NOCLIPHEIGHT|MF_NOGRAVITY);
|
||||
wave->momx = mobj->target->momx;
|
||||
wave->momy = mobj->target->momy;
|
||||
wave->momz = mobj->target->momz;
|
||||
P_SetMobjState(wave, S_BUBBLESHIELDWAVE1);
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
angle_t a = mobj->angle + ((i & 1) ? ANGLE_180 : 0);
|
||||
fixed_t ws = (mobj->target->scale>>1);
|
||||
mobj_t *wave;
|
||||
|
||||
// same thing, but + ANGLE_180
|
||||
wave = P_SpawnMobj(
|
||||
mobj->target->x + P_ReturnThrustX(NULL, mobj->angle + ANGLE_180, mobj->radius),
|
||||
mobj->target->y + P_ReturnThrustY(NULL, mobj->angle + ANGLE_180, mobj->radius),
|
||||
mobj->target->z, MT_THOK);
|
||||
wave->flags &= ~(MF_NOCLIPHEIGHT|MF_NOGRAVITY);
|
||||
wave->momx = mobj->target->momx;
|
||||
wave->momy = mobj->target->momy;
|
||||
wave->momz = mobj->target->momz;
|
||||
P_SetMobjState(wave, S_BUBBLESHIELDWAVE1);
|
||||
ws += (blow * ws) / bubbletime;
|
||||
|
||||
wave = P_SpawnMobj(
|
||||
(mobj->target->x - mobj->target->momx) + P_ReturnThrustX(NULL, a, mobj->radius - (21*ws)),
|
||||
(mobj->target->y - mobj->target->momy) + P_ReturnThrustY(NULL, a, mobj->radius - (21*ws)),
|
||||
(mobj->target->z - mobj->target->momz), MT_THOK);
|
||||
|
||||
wave->flags &= ~(MF_NOCLIPHEIGHT|MF_NOGRAVITY);
|
||||
P_SetScale(wave, (wave->destscale = ws));
|
||||
|
||||
wave->momx = mobj->target->momx;
|
||||
wave->momy = mobj->target->momy;
|
||||
wave->momz = mobj->target->momz;
|
||||
|
||||
P_SetMobjState(wave, S_BUBBLESHIELDWAVE1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -8545,7 +8548,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->destscale)>>2));
|
||||
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->scale)>>2));
|
||||
|
||||
curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states)));
|
||||
|
||||
|
|
@ -9258,6 +9261,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
break;
|
||||
case MT_BUBBLESHIELDTRAP:
|
||||
if (leveltime % 180 == 0)
|
||||
S_StartSound(mobj, sfx_s3kbfl);
|
||||
|
||||
if (mobj->tracer && !P_MobjWasRemoved(mobj->tracer) && mobj->tracer->player)
|
||||
{
|
||||
player_t *player = mobj->tracer->player;
|
||||
|
|
@ -9267,14 +9273,14 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_TeleportMove(mobj,
|
||||
mobj->tracer->x + P_ReturnThrustX(NULL, mobj->tracer->angle+ANGLE_90, (mobj->cvmem)<<FRACBITS),
|
||||
mobj->tracer->y + P_ReturnThrustY(NULL, mobj->tracer->angle+ANGLE_90, (mobj->cvmem)<<FRACBITS),
|
||||
mobj->tracer->z + (P_RandomRange(-abs(mobj->cvmem), abs(mobj->cvmem))<<FRACBITS));
|
||||
mobj->tracer->z - (4*mobj->tracer->scale) + (P_RandomRange(-abs(mobj->cvmem), abs(mobj->cvmem))<<FRACBITS));
|
||||
|
||||
mobj->cvmem /= 2;
|
||||
mobj->momz = 0;
|
||||
mobj->destscale = (5*mobj->tracer->scale)>>2;
|
||||
mobj->destscale = ((5*mobj->tracer->scale)>>2) + (mobj->tracer->scale>>3);
|
||||
|
||||
mobj->tracer->momx = (31*mobj->tracer->momx)/32;
|
||||
mobj->tracer->momy = (31*mobj->tracer->momy)/32;
|
||||
mobj->tracer->momx = (127*mobj->tracer->momx)/128;
|
||||
mobj->tracer->momy = (127*mobj->tracer->momy)/128;
|
||||
mobj->tracer->momz = (8*mobj->tracer->scale) * P_MobjFlip(mobj->tracer);
|
||||
|
||||
if (mobj->movecount > 8*TICRATE)
|
||||
|
|
|
|||
10
src/sounds.c
10
src/sounds.c
|
|
@ -408,13 +408,13 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"s3k3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Flame Shield spawned
|
||||
{"s3k3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Bubble Shield spawned
|
||||
{"s3k40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Thunder Shield spawned
|
||||
{"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Thunder Shield spawned
|
||||
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k44", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Bubble Shield reflect
|
||||
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart AIZ dust
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue