diff --git a/src/info.c b/src/info.c index 2c3399608..264fd8778 100644 --- a/src/info.c +++ b/src/info.c @@ -15646,7 +15646,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 100, // mass 1, // damage sfx_cdfm28, // activesound - MF_SPECIAL|MF_BOUNCE|MF_SHOOTABLE|MF_DONTENCOREMAP, // flags + MF_BOUNCE|MF_SHOOTABLE|MF_DONTENCOREMAP, // flags S_NULL // raisestate }, @@ -15673,7 +15673,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 100, // mass 1, // damage sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags + MF_SHOOTABLE|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags S_NULL // raisestate }, diff --git a/src/k_collide.c b/src/k_collide.c index 8cdbe14f4..f13ba3423 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -197,10 +197,72 @@ boolean K_EggItemCollide(mobj_t *t1, mobj_t *t2) { // Push fakes out of other item boxes if (t2->type == MT_RANDOMITEM || t2->type == MT_EGGMANITEM) + { P_InstaThrust(t1, R_PointToAngle2(t2->x, t2->y, t1->x, t1->y), t2->radius/4); + return true; + } - if (t1->type == MT_EGGMANITEM && t2->player) - P_TouchSpecialThing(t1, t2, false); + if (t2->player) + { + if ((t1->target == t2 || t1->target == t2->target) && (t1->threshold > 0)) + return true; + + if (t1->health <= 0 || t2->health <= 0) + return true; + + if (!P_CanPickupItem(t2->player, 2)) + return true; + + if (G_BattleGametype() && t2->player->kartstuff[k_bumper] <= 0) + { + if (t2->player->kartstuff[k_comebackmode] || t2->player->kartstuff[k_comebacktimer]) + return true; + t2->player->kartstuff[k_comebackmode] = 2; + } + else + { + K_DropItems(t2->player); //K_StripItems(t2->player); + //K_StripOther(t2->player); + t2->player->kartstuff[k_itemroulette] = 1; + t2->player->kartstuff[k_roulettetype] = 2; + } + + if (t2->player->kartstuff[k_flamedash] && t2->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD) + { + // Melt item + S_StartSound(t2, sfx_s3k43); + P_KillMobj(t1, t2, t2); + return true; + } + else + { + mobj_t *poof = P_SpawnMobj(t1->x, t1->y, t1->z, MT_EXPLODE); + S_StartSound(poof, t1->info->deathsound); + +#if 0 + // Eggbox snipe! + if (t1->type == MT_EGGMANITEM && t1->health > 1) + S_StartSound(t2, sfx_bsnipe); +#endif + + if (t1->target && t1->target->player) + { + if (G_RaceGametype() || t1->target->player->kartstuff[k_bumper] > 0) + t2->player->kartstuff[k_eggmanblame] = t1->target->player-players; + else + t2->player->kartstuff[k_eggmanblame] = t2->player-players; + + if (t1->target->hnext == t1) + { + P_SetTarget(&t1->target->hnext, NULL); + t1->target->player->kartstuff[k_eggmanheld] = 0; + } + } + + P_RemoveMobj(t1); + return true; + } + } return true; } diff --git a/src/p_inter.c b/src/p_inter.c index 6d1051e82..2c8324972 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -386,58 +386,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_SetTarget(&special->target, toucher); P_KillMobj(special, toucher, toucher); break; - case MT_EGGMANITEM_SHIELD: // SRB2kart - case MT_EGGMANITEM: - 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] || player->kartstuff[k_comebacktimer]) - return; - player->kartstuff[k_comebackmode] = 2; - } - else - { - K_DropItems(player); //K_StripItems(player); - //K_StripOther(player); - player->kartstuff[k_itemroulette] = 1; - player->kartstuff[k_roulettetype] = 2; - } - -#if 0 - // Eggbox snipe! - if (special->type == MT_EGGMANITEM && special->health > 1) - S_StartSound(toucher, sfx_bsnipe); -#endif - - { - mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE); - S_StartSound(poof, special->info->deathsound); - } - - if (special->target && special->target->player) - { - if (G_RaceGametype() || special->target->player->kartstuff[k_bumper] > 0) - player->kartstuff[k_eggmanblame] = special->target->player-players; - else - player->kartstuff[k_eggmanblame] = player-players; - - if (special->target->hnext == special) - { - P_SetTarget(&special->target->hnext, NULL); - special->target->player->kartstuff[k_eggmanheld] = 0; - } - } - - P_RemoveMobj(special); - return; case MT_KARMAHITBOX: if (!special->target->player) return;