From bc7673f2dad8d434ac389725737ebe7e05527bd6 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 23 Sep 2019 06:29:30 -0400 Subject: [PATCH] Update Spring Shells, add color modulo check --- src/info.c | 8 ++++---- src/p_map.c | 3 ++- src/p_mobj.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/info.c b/src/info.c index be32f3ebd..cb478b3d8 100644 --- a/src/info.c +++ b/src/info.c @@ -4253,7 +4253,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 32, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 0, // painchance + SKINCOLOR_TEA, // painchance sfx_s3kb1, // painsound S_NULL, // meleestate S_NULL, // missilestate @@ -4264,7 +4264,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 24*FRACUNIT, // radius 40*FRACUNIT, // height 0, // display offset - 13*FRACUNIT, // mass + 15*FRACUNIT, // mass 0, // damage sfx_None, // activesound MF_ENEMY|MF_SPECIAL|MF_SHOOTABLE, // flags @@ -4280,7 +4280,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 32, // reactiontime sfx_None, // attacksound S_NULL, // painstate - 0, // painchance + SKINCOLOR_YELLOW, // painchance sfx_s3kb1, // painsound S_NULL, // meleestate S_NULL, // missilestate @@ -4291,7 +4291,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 24*FRACUNIT, // radius 40*FRACUNIT, // height 0, // display offset - 26*FRACUNIT, // mass + 25*FRACUNIT, // mass 0, // damage sfx_None, // activesound MF_ENEMY|MF_SPECIAL|MF_SHOOTABLE, // flags diff --git a/src/p_map.c b/src/p_map.c index fbf5b4b06..36b5af70e 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -122,7 +122,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) const fixed_t vscale = mapobjectscale + (object->scale - mapobjectscale); fixed_t vertispeed = spring->info->mass; fixed_t horizspeed = spring->info->damage; - UINT8 starcolor = spring->info->painchance; + UINT8 starcolor = (spring->info->painchance % MAXTRANSLATIONS); fixed_t savemomx = 0; fixed_t savemomy = 0; @@ -1207,6 +1207,7 @@ static boolean PIT_CheckThing(mobj_t *thing) //else if (tmz > thzh - sprarea && tmz < thzh) // Don't damage people springing up / down return true; } + // missiles can hit other things if (tmthing->flags & MF_MISSILE || tmthing->type == MT_SHELL) { diff --git a/src/p_mobj.c b/src/p_mobj.c index ecb92a06e..de86bfb89 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12064,7 +12064,7 @@ ML_NOCLIMB : Direction not controllable { if (mthing->options & MTF_AMBUSH) { - if (mobj->flags & MF_SPRING) + if (mobj->flags & MF_SPRING && mobj->info->damage) mobj->angle += ANGLE_22h; if (mobj->flags & MF_NIGHTSITEM)