Merge branch 'sonicitems' into encore
# Conflicts: # src/info.c
This commit is contained in:
commit
57740bcc9b
|
@ -14566,7 +14566,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL, // missilestate
|
S_NULL, // missilestate
|
||||||
S_DEADFAKEITEM, // deathstate
|
S_DEADFAKEITEM, // deathstate
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_kc2e, // deathsound
|
||||||
8, // speed
|
8, // speed
|
||||||
16*FRACUNIT, // radius
|
16*FRACUNIT, // radius
|
||||||
32*FRACUNIT, // height
|
32*FRACUNIT, // height
|
||||||
|
@ -14574,7 +14574,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
100, // mass
|
100, // mass
|
||||||
1, // damage
|
1, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_SHOOTABLE|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
MF_SPECIAL|MF_SHOOTABLE|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -14593,7 +14593,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL, // missilestate
|
S_NULL, // missilestate
|
||||||
S_DEADFAKEITEM, // deathstate
|
S_DEADFAKEITEM, // deathstate
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_None, // deathsound
|
sfx_kc2e, // deathsound
|
||||||
0, // speed
|
0, // speed
|
||||||
16*FRACUNIT, // radius
|
16*FRACUNIT, // radius
|
||||||
32*FRACUNIT, // height
|
32*FRACUNIT, // height
|
||||||
|
@ -14601,7 +14601,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
100, // mass
|
100, // mass
|
||||||
1, // damage
|
1, // damage
|
||||||
sfx_fake, // activesound
|
sfx_fake, // activesound
|
||||||
MF_BOUNCE|MF_SHOOTABLE|MF_DONTENCOREMAP, // flags
|
MF_SPECIAL|MF_BOUNCE|MF_SHOOTABLE|MF_DONTENCOREMAP, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
47
src/k_kart.c
47
src/k_kart.c
|
@ -4474,6 +4474,7 @@ static patch_t *kp_battleinfo;
|
||||||
static patch_t *kp_wanted;
|
static patch_t *kp_wanted;
|
||||||
|
|
||||||
static patch_t *kp_itembg[4];
|
static patch_t *kp_itembg[4];
|
||||||
|
static patch_t *kp_itemtimer[2];
|
||||||
static patch_t *kp_itemmulsticker[2];
|
static patch_t *kp_itemmulsticker[2];
|
||||||
static patch_t *kp_itemx;
|
static patch_t *kp_itemx;
|
||||||
|
|
||||||
|
@ -4498,6 +4499,7 @@ static patch_t *kp_sadface[2];
|
||||||
static patch_t *kp_check[6];
|
static patch_t *kp_check[6];
|
||||||
|
|
||||||
static patch_t *kp_spbwarning[2];
|
static patch_t *kp_spbwarning[2];
|
||||||
|
static patch_t *kp_eggnum[4];
|
||||||
|
|
||||||
static patch_t *kp_fpview[3];
|
static patch_t *kp_fpview[3];
|
||||||
static patch_t *kp_inputwheel[5];
|
static patch_t *kp_inputwheel[5];
|
||||||
|
@ -4583,6 +4585,7 @@ void K_LoadKartHUDGraphics(void)
|
||||||
// Kart Item Windows
|
// Kart Item Windows
|
||||||
kp_itembg[0] = W_CachePatchName("K_ITBG", PU_HUDGFX);
|
kp_itembg[0] = W_CachePatchName("K_ITBG", PU_HUDGFX);
|
||||||
kp_itembg[1] = W_CachePatchName("K_ITBGD", PU_HUDGFX);
|
kp_itembg[1] = W_CachePatchName("K_ITBGD", PU_HUDGFX);
|
||||||
|
kp_itemtimer[0] = W_CachePatchName("K_ITIMER", PU_HUDGFX);
|
||||||
kp_itemmulsticker[0] = W_CachePatchName("K_ITMUL", PU_HUDGFX);
|
kp_itemmulsticker[0] = W_CachePatchName("K_ITMUL", PU_HUDGFX);
|
||||||
kp_itemx = W_CachePatchName("K_ITX", PU_HUDGFX);
|
kp_itemx = W_CachePatchName("K_ITX", PU_HUDGFX);
|
||||||
|
|
||||||
|
@ -4618,6 +4621,7 @@ void K_LoadKartHUDGraphics(void)
|
||||||
// Splitscreen
|
// Splitscreen
|
||||||
kp_itembg[2] = W_CachePatchName("K_ISBG", PU_HUDGFX);
|
kp_itembg[2] = W_CachePatchName("K_ISBG", PU_HUDGFX);
|
||||||
kp_itembg[3] = W_CachePatchName("K_ISBGD", PU_HUDGFX);
|
kp_itembg[3] = W_CachePatchName("K_ISBGD", PU_HUDGFX);
|
||||||
|
kp_itemtimer[1] = W_CachePatchName("K_ISIMER", PU_HUDGFX);
|
||||||
kp_itemmulsticker[1] = W_CachePatchName("K_ISMUL", PU_HUDGFX);
|
kp_itemmulsticker[1] = W_CachePatchName("K_ISMUL", PU_HUDGFX);
|
||||||
|
|
||||||
kp_sneaker[1] = W_CachePatchName("K_ISSHOE", PU_HUDGFX);
|
kp_sneaker[1] = W_CachePatchName("K_ISSHOE", PU_HUDGFX);
|
||||||
|
@ -4655,6 +4659,14 @@ void K_LoadKartHUDGraphics(void)
|
||||||
kp_spbwarning[0] = W_CachePatchName("K_SPBW1", PU_HUDGFX);
|
kp_spbwarning[0] = W_CachePatchName("K_SPBW1", PU_HUDGFX);
|
||||||
kp_spbwarning[1] = W_CachePatchName("K_SPBW2", PU_HUDGFX);
|
kp_spbwarning[1] = W_CachePatchName("K_SPBW2", PU_HUDGFX);
|
||||||
|
|
||||||
|
// Eggman warning numbers
|
||||||
|
sprintf(buffer, "K_EGGNx");
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
buffer[6] = '0'+i;
|
||||||
|
kp_eggnum[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
|
||||||
|
}
|
||||||
|
|
||||||
// First person mode
|
// First person mode
|
||||||
kp_fpview[0] = W_CachePatchName("VIEWA0", PU_HUDGFX);
|
kp_fpview[0] = W_CachePatchName("VIEWA0", PU_HUDGFX);
|
||||||
kp_fpview[1] = W_CachePatchName("VIEWB0D0", PU_HUDGFX);
|
kp_fpview[1] = W_CachePatchName("VIEWB0D0", PU_HUDGFX);
|
||||||
|
@ -4977,7 +4989,7 @@ static void K_drawKartItem(void)
|
||||||
case KITEM_BANANA: localpatch = kp_banana[offset]; break;
|
case KITEM_BANANA: localpatch = kp_banana[offset]; break;
|
||||||
case KITEM_EGGMAN: localpatch = kp_eggman[offset]; break;
|
case KITEM_EGGMAN: localpatch = kp_eggman[offset]; break;
|
||||||
case KITEM_ORBINAUT:
|
case KITEM_ORBINAUT:
|
||||||
localpatch = kp_orbinaut[(splitscreen ? 4
|
localpatch = kp_orbinaut[(splitscreen > 1 ? 4
|
||||||
: min(stplyr->kartstuff[k_itemamount]-1, 3))];
|
: min(stplyr->kartstuff[k_itemamount]-1, 3))];
|
||||||
break;
|
break;
|
||||||
case KITEM_JAWZ: localpatch = kp_jawz[offset]; break;
|
case KITEM_JAWZ: localpatch = kp_jawz[offset]; break;
|
||||||
|
@ -5014,14 +5026,35 @@ static void K_drawKartItem(void)
|
||||||
else
|
else
|
||||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch);
|
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch);
|
||||||
|
|
||||||
// Quick hack
|
// Meter for rocket sneaker, could be extended to work for any other timer item...
|
||||||
if (stplyr->kartstuff[k_eggmanexplode] > 1)
|
if (stplyr->kartstuff[k_rocketsneakertimer])
|
||||||
{
|
{
|
||||||
if (splitscreen > 1)
|
const INT32 barlength = (splitscreen > 1 ? 12 : 2);
|
||||||
V_DrawString(ITEM_X+12, ITEM_Y+12, V_HUDTRANS|splitflags, va("%d", G_TicsToSeconds(stplyr->kartstuff[k_eggmanexplode])));
|
const INT32 timer = stplyr->kartstuff[k_rocketsneakertimer]; // item's timer
|
||||||
else
|
const INT32 max = itemtime; // timer's normal highest value
|
||||||
V_DrawKartString(ITEM_X+18, ITEM_Y+18, V_HUDTRANS|splitflags, va("%d", G_TicsToSeconds(stplyr->kartstuff[k_eggmanexplode])));
|
INT32 length = min(barlength, (timer * barlength) / max);
|
||||||
|
INT32 height = (splitscreen > 1 ? 1 : 2);
|
||||||
|
INT32 x = (splitscreen > 1 ? 17 : 11), y = (splitscreen > 1 ? 27 : 35);
|
||||||
|
|
||||||
|
V_DrawScaledPatch(ITEM_X+x, ITEM_Y+y, V_HUDTRANS|splitflags, kp_itemtimer[offset]);
|
||||||
|
// The dark "AA" edges on the sides
|
||||||
|
V_DrawFill(ITEM_X+x+1, ITEM_Y+y+1, length, height, 12);
|
||||||
|
// The bar itself
|
||||||
|
if (length >= 3)
|
||||||
|
{
|
||||||
|
if (height == 1)
|
||||||
|
V_DrawFill(ITEM_X+x+2, ITEM_Y+y+1, length-1, height, 120);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
V_DrawFill(ITEM_X+x+2, ITEM_Y+y+1, length-1, height, 8);
|
||||||
|
V_DrawFill(ITEM_X+x+2, ITEM_Y+y+1, length-1, height/2, 120);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Quick Eggman numbers
|
||||||
|
if (stplyr->kartstuff[k_eggmanexplode] > 1 /*&& stplyr->kartstuff[k_eggmanexplode] <= 3*TICRATE*/)
|
||||||
|
V_DrawScaledPatch(ITEM_X+17, ITEM_Y+13, V_HUDTRANS|splitflags, kp_eggnum[min(3, G_TicsToSeconds(stplyr->kartstuff[k_eggmanexplode]))]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartTimestamp(void)
|
static void K_drawKartTimestamp(void)
|
||||||
|
|
|
@ -155,21 +155,42 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
|
||||||
if (player->exiting || mapreset)
|
if (player->exiting || mapreset)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0) // No bumpers in Match
|
if (weapon == 2 && G_BattleGametype() && player->kartstuff[k_bumper] <= 0) // No bumpers in Match
|
||||||
return false;*/
|
return false;
|
||||||
|
|
||||||
if (weapon)
|
if (weapon)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_stealingtimer] || player->kartstuff[k_stolentimer]
|
// Item slot already taken up
|
||||||
|| player->kartstuff[k_growshrinktimer] != 0 || player->kartstuff[k_rocketsneakertimer]
|
if (weapon == 2)
|
||||||
|| player->kartstuff[k_eggmanexplode]) // Item-specific timer going off
|
{
|
||||||
return false;
|
// Invulnerable
|
||||||
|
if (player->powers[pw_flashing] > 0
|
||||||
|
|| player->kartstuff[k_spinouttimer] > 0
|
||||||
|
|| player->kartstuff[k_squishedtimer] > 0
|
||||||
|
|| player->kartstuff[k_invincibilitytimer] > 0
|
||||||
|
|| player->kartstuff[k_growshrinktimer] > 0
|
||||||
|
|| player->kartstuff[k_hyudorotimer] > 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
if ((player->kartstuff[k_itemroulette] && weapon != 2)
|
// Already have fake
|
||||||
|| (player->kartstuff[k_roulettetype] == 2 && weapon == 2)
|
if (player->kartstuff[k_roulettetype] == 2
|
||||||
|| player->kartstuff[k_itemamount]
|
|| player->kartstuff[k_eggmanexplode])
|
||||||
|| player->kartstuff[k_itemheld]) // Item slot already taken up
|
return false;
|
||||||
return false;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Item-specific timer going off
|
||||||
|
if (player->kartstuff[k_stealingtimer] || player->kartstuff[k_stolentimer]
|
||||||
|
|| player->kartstuff[k_growshrinktimer] != 0 || player->kartstuff[k_rocketsneakertimer]
|
||||||
|
|| player->kartstuff[k_eggmanexplode])
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Item slot already taken up
|
||||||
|
if (player->kartstuff[k_itemroulette]
|
||||||
|
|| player->kartstuff[k_itemamount]
|
||||||
|
|| player->kartstuff[k_itemheld])
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -414,7 +435,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
|
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_comebackmode] == 1 || player->kartstuff[k_comebacktimer])
|
if (player->kartstuff[k_comebackmode] != 0 || player->kartstuff[k_comebacktimer])
|
||||||
return;
|
return;
|
||||||
if (player->kartstuff[k_comebackmode] == 0)
|
if (player->kartstuff[k_comebackmode] == 0)
|
||||||
player->kartstuff[k_comebackmode] = 1;
|
player->kartstuff[k_comebackmode] = 1;
|
||||||
|
@ -424,6 +445,44 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_SetTarget(&special->target, toucher);
|
P_SetTarget(&special->target, toucher);
|
||||||
P_KillMobj(special, toucher, toucher);
|
P_KillMobj(special, toucher, toucher);
|
||||||
break;
|
break;
|
||||||
|
case MT_FAKESHIELD: // SRB2kart
|
||||||
|
case MT_FAKEITEM:
|
||||||
|
if ((special->target == toucher || special->target == toucher->target) && (special->threshold > 0))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (special->health <= 0 || toucher->health <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!P_CanPickupItem(player, 2))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
|
||||||
|
{
|
||||||
|
/*if (player->kartstuff[k_comebackmode] != 0 || player->kartstuff[k_comebacktimer])
|
||||||
|
return;
|
||||||
|
if (player->kartstuff[k_comebackmode] == 0)
|
||||||
|
player->kartstuff[k_comebackmode] = 2;*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE);
|
||||||
|
S_StartSound(poof, special->info->deathsound);
|
||||||
|
|
||||||
|
K_StripItems(player);
|
||||||
|
if (player->kartstuff[k_itemroulette] <= 0)
|
||||||
|
player->kartstuff[k_itemroulette] = 1;
|
||||||
|
player->kartstuff[k_roulettetype] = 2;
|
||||||
|
if (special->target && special->target->player
|
||||||
|
&& (G_RaceGametype() || special->target->player->kartstuff[k_bumper] > 0))
|
||||||
|
player->kartstuff[k_eggmanblame] = special->target->player-players;
|
||||||
|
else
|
||||||
|
player->kartstuff[k_eggmanblame] = player-players;
|
||||||
|
|
||||||
|
P_RemoveMobj(special);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case MT_KARMAHITBOX:
|
case MT_KARMAHITBOX:
|
||||||
if (!special->target->player)
|
if (!special->target->player)
|
||||||
return;
|
return;
|
||||||
|
@ -485,6 +544,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
player->kartstuff[k_roulettetype] = 1;
|
player->kartstuff[k_roulettetype] = 1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
// Rings, coins, spheres, weapon panels, etc //
|
// Rings, coins, spheres, weapon panels, etc //
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
|
|
192
src/p_map.c
192
src/p_map.c
|
@ -742,37 +742,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
|
||||||
{
|
|
||||||
if (tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
|
||||||
{
|
|
||||||
// This Item Damage
|
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
|
||||||
tmthing->z -= tmthing->height;
|
|
||||||
else
|
|
||||||
tmthing->z += tmthing->height;
|
|
||||||
|
|
||||||
S_StartSound(tmthing, tmthing->info->deathsound);
|
|
||||||
P_KillMobj(tmthing, thing, thing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
|
|
||||||
P_SpawnMobj(thing->x/2 + tmthing->x/2, thing->y/2 + tmthing->y/2, thing->z/2 + tmthing->z/2, MT_ITEMCLASH);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Other Item Damage
|
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
|
||||||
thing->z -= thing->height;
|
|
||||||
else
|
|
||||||
thing->z += thing->height;
|
|
||||||
|
|
||||||
S_StartSound(thing, thing->info->deathsound);
|
|
||||||
P_KillMobj(thing, tmthing, tmthing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
}
|
|
||||||
else if (thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE)
|
else if (thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE)
|
||||||
{
|
{
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
|
@ -934,131 +903,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
|
||||||
{
|
|
||||||
if (tmthing->type == MT_BANANA_SHIELD)
|
|
||||||
{
|
|
||||||
// This Item Damage
|
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
|
||||||
tmthing->z -= tmthing->height;
|
|
||||||
else
|
|
||||||
tmthing->z += tmthing->height;
|
|
||||||
|
|
||||||
S_StartSound(tmthing, tmthing->info->deathsound);
|
|
||||||
P_KillMobj(tmthing, thing, thing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
|
|
||||||
P_SpawnMobj(thing->x/2 + tmthing->x/2, thing->y/2 + tmthing->y/2, thing->z/2 + tmthing->z/2, MT_ITEMCLASH);
|
|
||||||
}
|
|
||||||
// Other Item Damage
|
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
|
||||||
thing->z -= thing->height;
|
|
||||||
else
|
|
||||||
thing->z += thing->height;
|
|
||||||
|
|
||||||
S_StartSound(thing, thing->info->deathsound);
|
|
||||||
P_KillMobj(thing, tmthing, tmthing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (tmthing->type == MT_FAKESHIELD || tmthing->type == MT_FAKEITEM)
|
|
||||||
{
|
|
||||||
// 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->target == thing) || (tmthing->target == thing->target)) && (tmthing->threshold > 0 || (thing->type != MT_PLAYER && thing->threshold > 0)))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (tmthing->health <= 0 || thing->health <= 0)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (thing->player && thing->player->powers[pw_flashing])
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (thing->type == MT_ORBINAUT // When these items collide with the fake item, just the fake item is destroyed
|
|
||||||
|| thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
|
||||||
|| thing->type == MT_SSMINE
|
|
||||||
|| thing->type == MT_BANANA || thing->type == MT_BALLHOG)
|
|
||||||
{
|
|
||||||
// This Item Damage
|
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
|
||||||
tmthing->z -= tmthing->height;
|
|
||||||
else
|
|
||||||
tmthing->z += tmthing->height;
|
|
||||||
|
|
||||||
S_StartSound(tmthing, tmthing->info->deathsound);
|
|
||||||
P_KillMobj(tmthing, thing, thing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
}
|
|
||||||
else if (thing->type == MT_ORBINAUT_SHIELD // When these items collide with the fake item, both of them are destroyed
|
|
||||||
|| thing->type == MT_JAWZ_SHIELD
|
|
||||||
|| thing->type == MT_SSMINE_SHIELD
|
|
||||||
|| thing->type == MT_BANANA_SHIELD
|
|
||||||
|| thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
|
||||||
{
|
|
||||||
// Other Item Damage
|
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
|
||||||
thing->z -= thing->height;
|
|
||||||
else
|
|
||||||
thing->z += thing->height;
|
|
||||||
|
|
||||||
S_StartSound(thing, thing->info->deathsound);
|
|
||||||
P_KillMobj(thing, tmthing, tmthing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
|
|
||||||
P_SpawnMobj(thing->x/2 + tmthing->x/2, thing->y/2 + tmthing->y/2, thing->z/2 + tmthing->z/2, MT_ITEMCLASH);
|
|
||||||
|
|
||||||
// This Item Damage
|
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
|
||||||
tmthing->z -= tmthing->height;
|
|
||||||
else
|
|
||||||
tmthing->z += tmthing->height;
|
|
||||||
|
|
||||||
S_StartSound(tmthing, tmthing->info->deathsound);
|
|
||||||
P_KillMobj(tmthing, thing, thing);
|
|
||||||
|
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
|
||||||
}
|
|
||||||
else if (thing->type == MT_PLAYER)
|
|
||||||
{
|
|
||||||
// Player Damage
|
|
||||||
{
|
|
||||||
mobj_t *poof = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_EXPLODE);
|
|
||||||
S_StartSound(poof, sfx_kc2e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (P_CanPickupItem(thing->player, 2))
|
|
||||||
{
|
|
||||||
if (thing->player->kartstuff[k_itemroulette] <= 0)
|
|
||||||
thing->player->kartstuff[k_itemroulette] = 1;
|
|
||||||
thing->player->kartstuff[k_roulettetype] = 2;
|
|
||||||
if (tmthing->target && tmthing->target->player)
|
|
||||||
thing->player->kartstuff[k_eggmanblame] = tmthing->target->player-players;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This Item Damage
|
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
|
||||||
tmthing->z -= tmthing->height;
|
|
||||||
else
|
|
||||||
tmthing->z += tmthing->height;
|
|
||||||
|
|
||||||
S_StartSound(tmthing, tmthing->info->deathsound);
|
|
||||||
P_RemoveMobj(tmthing);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1106,7 +950,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
else if (tmthing->type == MT_PLAYER &&
|
else if (tmthing->type == MT_PLAYER &&
|
||||||
(thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_ORBINAUT
|
(thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_ORBINAUT
|
||||||
|| thing->type == MT_JAWZ_SHIELD || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
|| thing->type == MT_JAWZ_SHIELD || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||||
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM
|
|
||||||
|| thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
|| thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
||||||
|| thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE
|
|| thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE
|
||||||
|| thing->type == MT_MINEEXPLOSION
|
|| thing->type == MT_MINEEXPLOSION
|
||||||
|
@ -1120,8 +963,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
|
|
||||||
if (tmthing->player && tmthing->player->powers[pw_flashing]
|
if (tmthing->player && tmthing->player->powers[pw_flashing]
|
||||||
&& !(thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
&& !(thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD))
|
||||||
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
||||||
|
@ -1152,38 +994,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM)
|
|
||||||
{
|
|
||||||
if ((thing->target == tmthing) && (thing->threshold > 0))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (tmthing->health <= 0 || thing->health <= 0)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Player Damage
|
|
||||||
{
|
|
||||||
mobj_t *poof = P_SpawnMobj(thing->x, thing->y, thing->z, MT_EXPLODE);
|
|
||||||
S_StartSound(poof, sfx_kc2e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (P_CanPickupItem(tmthing->player, 2))
|
|
||||||
{
|
|
||||||
if (tmthing->player->kartstuff[k_itemroulette] <= 0)
|
|
||||||
tmthing->player->kartstuff[k_itemroulette] = 1;
|
|
||||||
tmthing->player->kartstuff[k_roulettetype] = 2;
|
|
||||||
if (thing->target && thing->target->player)
|
|
||||||
tmthing->player->kartstuff[k_eggmanblame] = thing->target->player-players;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Other Item Damage
|
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
|
||||||
thing->z -= thing->height;
|
|
||||||
else
|
|
||||||
thing->z += thing->height;
|
|
||||||
|
|
||||||
S_StartSound(thing, thing->info->deathsound);
|
|
||||||
P_RemoveMobj(thing);
|
|
||||||
}
|
|
||||||
else if (thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
else if (thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
||||||
|| thing->type == MT_BALLHOG)
|
|| thing->type == MT_BALLHOG)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue