diff --git a/src/info.c b/src/info.c index f0c047ba..7f5f69b6 100644 --- a/src/info.c +++ b/src/info.c @@ -58,7 +58,7 @@ char sprnames[NUMSPRITES + 1][5] = "SPRG","BSPR","RNDM","RPOP","KFRE","DRIF","DSMO","FITM","DFAK","BANA", "DBAN","GSHE","GSTR","DGSH","RSHE","RSTR","DRSH","BOMB","BLIG","LIGH", "SINK","SITR","LAKI","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS", - "BUZB","CHOM","SACO","CRAB","SHAD","BUMP","FLEN" + "BUZB","CHOM","SACO","CRAB","SHAD","BUMP","FLEN","CLAS" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -2859,6 +2859,12 @@ state_t states[NUMSTATES] = {SPR_FLEN, FF_FULLBRIGHT|1, 3, {NULL}, 0, 0, S_FLINGENERGY3}, // S_FLINGENERGY2, {SPR_FLEN, FF_FULLBRIGHT|2, 3, {NULL}, 0, 0, S_NULL}, // S_FLINGENERGY3, + {SPR_CLAS, FF_FULLBRIGHT|FF_TRANS30|1, 2, {NULL}, 0, 0, S_CLASH2}, + {SPR_CLAS, FF_FULLBRIGHT|FF_TRANS30|2, 2, {NULL}, 0, 0, S_CLASH3}, + {SPR_CLAS, FF_FULLBRIGHT|FF_TRANS30|3, 2, {NULL}, 0, 0, S_CLASH4}, + {SPR_CLAS, FF_FULLBRIGHT|FF_TRANS30|4, 2, {NULL}, 0, 0, S_CLASH5}, + {SPR_CLAS, FF_FULLBRIGHT|FF_TRANS30|5, 2, {NULL}, 0, 0, S_NULL}, + #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK #endif @@ -16571,6 +16577,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT, // flags S_NULL // raisestate }, + + { // MT_ITEMCLASH + -1, // doomednum + S_CLASH1, // spawnstate + 1, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 0, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 60*FRACUNIT, // speed + 32*FRACUNIT, // radius + 64*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_SCENERY, // flags + S_NULL // raisestate + }, // ============================================================================================================================// #ifdef SEENAMES diff --git a/src/info.h b/src/info.h index 1f985531..bc2dbfba 100644 --- a/src/info.h +++ b/src/info.h @@ -619,6 +619,7 @@ typedef enum sprite SPR_BUMP, // Player/shell bump SPR_FLEN, // Shell hit graphics stuff + SPR_CLAS, // items clash SPR_FIRSTFREESLOT, SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1, @@ -3375,6 +3376,12 @@ typedef enum state S_FLINGENERGY2, S_FLINGENERGY3, + S_CLASH1, + S_CLASH2, + S_CLASH3, + S_CLASH4, + S_CLASH5, + #ifdef SEENAMES S_NAMECHECK, #endif @@ -4016,6 +4023,8 @@ typedef enum mobj_type MT_FLINGENERGY, + MT_ITEMCLASH, + #ifdef SEENAMES MT_NAMECHECK, #endif diff --git a/src/p_map.c b/src/p_map.c index c071b160..251151e8 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -711,6 +711,7 @@ static boolean PIT_CheckThing(mobj_t *thing) 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) @@ -769,7 +770,6 @@ static boolean PIT_CheckThing(mobj_t *thing) P_SetObjectMomZ(tmthing, 8*FRACUNIT, false); P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT); - // Bomb death P_KillMobj(thing, tmthing, tmthing); } @@ -895,6 +895,8 @@ static boolean PIT_CheckThing(mobj_t *thing) 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; @@ -987,6 +989,8 @@ static boolean PIT_CheckThing(mobj_t *thing) 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;