From 4db656db1a701a310118340f7b41180ad7fae879 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Sat, 20 Oct 2018 16:10:40 +0200 Subject: [PATCH 01/33] Midnight Channel hardcode --- src/dehacked.c | 4 +- src/info.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++- src/info.h | 28 ++++++++++ src/p_enemy.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++++ src/sounds.c | 2 + src/sounds.h | 2 + 6 files changed, 299 insertions(+), 3 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 60d38a63..9b4ddc71 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1837,7 +1837,9 @@ static actionpointer_t actionpointers[] = {{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart {{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart {{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart - {{A_LightningFollowPlayer}, "A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart + {{A_LightningFollowPlayer},"A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart + {{A_RandomShadowFrame}, "A_RANDOMSHADOWFRAME"}, //SRB2kart + {{A_RoamingShadowThinker}, "A_ROAMINGSHADOWTHINKER"}, //SRB2kart {{A_OrbitNights}, "A_ORBITNIGHTS"}, {{A_GhostMe}, "A_GHOSTME"}, {{A_SetObjectState}, "A_SETOBJECTSTATE"}, diff --git a/src/info.c b/src/info.c index 2efa68ab..e0a55a8a 100644 --- a/src/info.c +++ b/src/info.c @@ -61,7 +61,7 @@ char sprnames[NUMSPRITES + 1][5] = "DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM", "SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB", "ARRO","ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK", - "LZI1","LZI2","KLIT","VIEW" + "LZI1","LZI2","KLIT", "SPTL", "ENM1", "GARU", "MARR", "VIEW" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -3064,7 +3064,24 @@ state_t states[NUMSTATES] = {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|4, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT10}, // S_KLIT9 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT11}, // S_KLIT10 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT12}, // S_KLIT11 - {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12 + {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12 + + // Midnight Channel stuff, yay more boring states! + {SPR_SPTL, 0, -1, {NULL}, 0, 0, S_SPOTLIGHT}, // S_SPOTLIGHT + {SPR_ENM1, 0, 1, {A_RandomShadowFrame}, 0, 0, S_RANDOMSHADOW}, // S_RANDOMSHADOW + + {SPR_GARU, 0, 2, {NULL}, 0, 0, S_GARU2}, // S_GARU1 + {SPR_GARU, 1, 2, {NULL}, 0, 0, S_GARU3}, // S_GARU2 + {SPR_GARU, 2, 2, {NULL}, 0, 0, S_NULL}, // S_GARU3 + + {SPR_NULL, 0, 2, {NULL}, 0, 0, S_TGARU1}, // S_TGARU0 + {SPR_GARU, FF_TRANS30, 2, {NULL}, 0, 0, S_GARU2}, // S_TGARU1 + {SPR_GARU, 1|FF_TRANS30, 2, {NULL}, 0, 0, S_GARU3}, // S_TGARU2 + {SPR_GARU, 2|FF_TRANS30, 2, {NULL}, 0, 0, S_NULL}, // S_TGARU3 + + {SPR_ENM1, 2, 1, {A_RoamingShadowThinker}, 0, 0, S_ROAMINGSHADOW}, //S_ROAMINGSHADOW + + {SPR_MARR, 0, 1, {A_MayonakaArrow}, 0, 0, S_MAYONAKAARROW}, //S_MAYONAKAARROW #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK @@ -17210,6 +17227,116 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOTHINK|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_DONTENCOREMAP, // flags S_NULL // raisestate }, + + // Midnight Channel stuff: + + { // MT_SPOTLIGHT + 3124, // doomednum + S_SPOTLIGHT, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 8*FRACUNIT, // radius + 16*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOTHINK|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags + S_NULL // raisestate + }, + + { // MT_RANDOMSHADOW + 3120, // doomednum + S_RANDOMSHADOW, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 16*FRACUNIT, // radius + 32*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_SCENERY|MF_PAIN, // flags + S_NULL // raisestate + }, + + { // MT_ROAMINGSHADOW + 3121, // doomednum + S_ROAMINGSHADOW, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 16*FRACUNIT, // radius + 32*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_SOLID|MF_PAIN|MF_SPECIAL|MF_RUNSPAWNFUNC, // flags + S_NULL // raisestate + }, + + { // MT_MAYONAKAARROW + 3122, // doomednum + S_MAYONAKAARROW, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 64*FRACUNIT, // radius + 128*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags + S_NULL // raisestate + }, // ============================================================================================================================// diff --git a/src/info.h b/src/info.h index f14d2121..5dbc68d8 100644 --- a/src/info.h +++ b/src/info.h @@ -169,6 +169,9 @@ void A_JawzExplode(); // SRB2kart void A_MineExplode(); // SRB2kart void A_BallhogExplode(); // SRB2kart void A_LightningFollowPlayer(); // SRB2kart: Lightning shield effect player chasing +void A_RandomShadowFrame(); //SRB2kart: Shadow spawner frame randomizer +void A_RoamingShadowThinker(); // SRB2kart: Roaming Shadow moving + attacking players. +void A_MayonakaArrow(); //SRB2kart: midnight channel arrow sign void A_OrbitNights(); void A_GhostMe(); void A_SetObjectState(); @@ -652,6 +655,12 @@ typedef enum sprite SPR_LZI1, // Lightning that falls on the player for lightning shield SPR_LZI2, // ditto SPR_KLIT, // You have a twisted mind. But this actually is for the diagonal lightning. + + // Midnight Channel stuff: + SPR_SPTL, // Spotlight + SPR_ENM1, // Shadows (Roaming and static) + SPR_GARU, // Wind attack roaming shadows use. + SPR_MARR, // Mayonaka Arrow SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw! @@ -3612,6 +3621,19 @@ typedef enum state S_KLIT10, S_KLIT11, S_KLIT12, + + // Midnight Channel stuff: + S_SPOTLIGHT, // Spotlight decoration + S_RANDOMSHADOW, // Random Shadow. They're static and don't do nothing. + S_GARU1, + S_GARU2, + S_GARU3, + S_TGARU0, + S_TGARU1, + S_TGARU2, + S_TGARU3, // Wind attack used by Roaming Shadows on Players. + S_ROAMINGSHADOW, // Roaming Shadow (the one that uses above's wind attack or smth) + S_MAYONAKAARROW, // Arrow sign #ifdef SEENAMES S_NAMECHECK, @@ -4282,6 +4304,12 @@ typedef enum mobj_type MT_KARMAHITBOX, MT_KARMAWHEEL, + + // Midnight Channel stuff: + MT_SPOTLIGHT, // Spotlight Object + MT_RANDOMSHADOW, // Random static Shadows. + MT_ROAMINGSHADOW, // Roaming Shadows. + MT_MAYONAKAARROW, // Arrow static signs for Mayonaka #ifdef SEENAMES MT_NAMECHECK, diff --git a/src/p_enemy.c b/src/p_enemy.c index 37dd5899..969a3282 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -193,6 +193,9 @@ void A_JawzExplode(mobj_t *actor); // SRB2kart void A_MineExplode(mobj_t *actor); // SRB2kart void A_BallhogExplode(mobj_t *actor); // SRB2kart void A_LightningFollowPlayer(mobj_t *actor); // SRB2kart +void A_RandomShadowFrame(mobj_t *actor); // SRB2kart +void A_RoamingShadowThinker(mobj_t *actor); //SRB2kart +void A_MayonakaArrow(mobj_t *actor); //SRB2kart void A_OrbitNights(mobj_t *actor); void A_GhostMe(mobj_t *actor); void A_SetObjectState(mobj_t *actor); @@ -8421,6 +8424,138 @@ void A_LightningFollowPlayer(mobj_t *actor) return; } +// A_RandomShadowFrame +// Gives a random sprite for the Mayonaka static shadows. Dumb and simple. +void A_RandomShadowFrame(mobj_t *actor) +{ + mobj_t *fire; + mobj_t *fake; +#ifdef HAVE_BLUA + if (LUA_CallAction("A_RandomShadowFrame", (actor))) + return; +#endif + + if (!actor->extravalue1) // Hack that spawns thoks that look like random shadows. Otherwise the state would overwrite our frame and that's a pain. + { + fake = P_SpawnMobj(actor->x, actor->y, actor->z, MT_THOK); + fake->sprite = SPR_ENM1; + fake->frame = P_RandomRange(0, 6); + P_SetScale(fake, FRACUNIT*3/2); + fake->scale = FRACUNIT*3/2; + fake->destscale = FRACUNIT*3/2; + fake->angle = actor->angle; + fake->tics = -1; + actor->flags2 |= MF2_DONTDRAW; + actor->extravalue1 = 1; + } + + P_SetScale(actor, FRACUNIT*3/2); + + // I have NO CLUE how to hardcode all of that fancy Linedef Executor shit so the fire spinout will be done by these entities directly. + if (P_LookForPlayers(actor, false, false, 512<target && !actor->target->player->powers[pw_flashing] + && !actor->target->player->kartstuff[k_invincibilitytimer] + && !actor->target->player->kartstuff[k_growshrinktimer] + && !actor->target->player->kartstuff[k_spinouttimer] + && P_IsObjectOnGround(actor->target) + && actor->z == actor->target->z) + { + P_DamageMobj(actor->target, actor, actor, 1); + P_InstaThrust(actor->target, actor->angle, 16<target->x, actor->target->y, actor->target->z, MT_THOK); + P_SetMobjStateNF(fire, S_QUICKBOOM1); + P_SetScale(fire, 4<color = SKINCOLOR_RED; + S_StartSound(actor->target, sfx_fire2); + } + } + return; +} + +// A_RoamingShadowThinker +// Thinker for Midnight Channel's Roaming Shadows: +void A_RoamingShadowThinker(mobj_t *actor) +{ + mobj_t *wind; + +#ifdef HAVE_BLUA + if (LUA_CallAction("A_RoamingShadowThinker", (actor))) + return; +#endif + // extravalue1 replaces "movetimer" + // extravalue2 replaces "stoptimer" + + P_SetScale(actor, FRACUNIT*3/2); + if (!actor->extravalue2) + { + P_InstaThrust(actor, actor->angle, 8<extravalue1 = ((actor->extravalue1) ? (actor->extravalue1-1) : (TICRATE*5+1)); // deplete timer if set, set to 5 ticrate otherwise. + if (actor->extravalue1 == 1) // if timer reaches 1, do a u-turn. + { + actor->extravalue1 = 0; + actor->extravalue2 = 60; + } + // Search for and attack Players venturing too close in front of us. + + if (P_LookForPlayers(actor, false, false, 256<target && !actor->target->player->powers[pw_flashing] + && !actor->target->player->kartstuff[k_invincibilitytimer] + && !actor->target->player->kartstuff[k_growshrinktimer] + && !actor->target->player->kartstuff[k_spinouttimer]) + { + // send them flying and spawn the WIND! + P_InstaThrust(actor->target, 0, 0); + P_DamageMobj(actor->target, actor, actor, 1); + P_SetObjectMomZ(actor->target, 16<target, sfx_wind1); + + // Spawn the WIND: + wind = P_SpawnMobj(actor->target->x, actor->target->y, actor->target->z, MT_THOK); // Opaque layer: + P_SetMobjState(wind, S_GARU1); + P_SetScale(wind, FRACUNIT*3/2); + wind = P_SpawnMobj(actor->target->x, actor->target->y, actor->target->z, MT_THOK); // Translucent layer: + P_SetMobjState(wind, S_TGARU0); + P_SetScale(wind, FRACUNIT*3/2); + wind->destscale = 30<angle += ANG1*3; + actor->extravalue2--; + } + return; +} + +// A_MayonakaArrow +// Used for the arrow sprite animations in Mayonaka. It's only extra visual bullshit to make em more random. + +void A_MayonakaArrow(mobj_t *actor) +{ + INT32 flip = 0; +#ifdef HAVE_BLUA + if (LUA_CallAction("A_MayonakaArrow", (actor))) + return; +#endif + // "animtimer" is replaced by "extravalue1" here. + actor->extravalue1 = ((actor->extravalue1) ? (actor->extravalue1+1) : (P_RandomRange(0, TICRATE*3))); + flip = ((actor->spawnpoint->options & 1) ? (3) : (0)); // flip adds 3 frames, which is the flipped version of the sign. + + actor->frame = flip; + if (actor->extravalue1 >= TICRATE*7/2) + actor->extravalue1 = 0; // reset to 0 and start a new cycle. + else if (actor->extravalue1 > TICRATE*7/2 -4) + actor->frame = flip+2; + else if (actor->extravalue1 > TICRATE*3 && leveltime%2 > 0) + actor->frame = flip+1; + + actor->frame |= FF_PAPERSPRITE; + actor->momz = 0; + return; +} //} // Function: A_OrbitNights diff --git a/src/sounds.c b/src/sounds.c index 02ad0853..625522be 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -813,6 +813,8 @@ sfxinfo_t S_sfx[NUMSFX] = {"kpogos", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"zio3", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, + {"wind1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, + {"fire2", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"mcitm1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"chaooo", false, 110, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, diff --git a/src/sounds.h b/src/sounds.h index 2516b646..ccd99e99 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -888,6 +888,8 @@ typedef enum sfx_kpogos, sfx_ddash, sfx_zio3, + sfx_wind1, + sfx_fire2, sfx_mcitm1, sfx_chaooo, sfx_itfree, From 39d24f2319ca4c6d461b727ed6c80c5a64023286 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Sat, 20 Oct 2018 21:17:13 +0200 Subject: [PATCH 02/33] Mementos hardcode --- src/dehacked.c | 2 + src/info.c | 116 +++++++++++++++++++++++++- src/info.h | 16 ++++ src/p_enemy.c | 222 ++++++++++++++++++++++++++++++++++++++++++++++++- src/p_inter.c | 10 +++ src/sounds.c | 1 + src/sounds.h | 1 + 7 files changed, 366 insertions(+), 2 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 9b4ddc71..30def251 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1840,6 +1840,8 @@ static actionpointer_t actionpointers[] = {{A_LightningFollowPlayer},"A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart {{A_RandomShadowFrame}, "A_RANDOMSHADOWFRAME"}, //SRB2kart {{A_RoamingShadowThinker}, "A_ROAMINGSHADOWTHINKER"}, //SRB2kart + {{A_ReaperThinker}, "A_REAPERTHINKER"}, //SRB2kart + {{A_MementosTPParticles}, "A_MEMENTOSTPPARTICLES"}, //SRB2kart {{A_OrbitNights}, "A_ORBITNIGHTS"}, {{A_GhostMe}, "A_GHOSTME"}, {{A_SetObjectState}, "A_SETOBJECTSTATE"}, diff --git a/src/info.c b/src/info.c index e0a55a8a..231f672a 100644 --- a/src/info.c +++ b/src/info.c @@ -61,7 +61,7 @@ char sprnames[NUMSPRITES + 1][5] = "DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM", "SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB", "ARRO","ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK", - "LZI1","LZI2","KLIT", "SPTL", "ENM1", "GARU", "MARR", "VIEW" + "LZI1","LZI2","KLIT", "SPTL", "ENM1", "GARU", "MARR", "REAP", "VIEW" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -3082,6 +3082,11 @@ state_t states[NUMSTATES] = {SPR_ENM1, 2, 1, {A_RoamingShadowThinker}, 0, 0, S_ROAMINGSHADOW}, //S_ROAMINGSHADOW {SPR_MARR, 0, 1, {A_MayonakaArrow}, 0, 0, S_MAYONAKAARROW}, //S_MAYONAKAARROW + + //Mementos stuff + {SPR_NULL, 0, TICRATE*130, {NULL}, 0, 0, S_REAPER}, //S_REAPER_INVIS + {SPR_REAP, 0, 1, {A_ReaperThinker}, 0, 0, S_REAPER}, //S_REAPER + {SPR_NULL, 0, 1, {A_MementosTPParticles}, 0, 0, S_MEMENTOSTP}, //S_MEMENTOSTP #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK @@ -17337,6 +17342,115 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags S_NULL // raisestate }, + + // Mementos stuff + { // MT_REAPERWAYPOINT + 3199, // doomednum + S_INVISIBLE, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 64*FRACUNIT, // radius + 128*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY, // flags + S_NULL // raisestate + }, + + { // MT_REAPER + 3202, // doomednum + S_REAPER_INVIS, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 64*FRACUNIT, // radius + 128*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY, // flags + S_NULL // raisestate + }, + + { // MT_MEMENTOSTP + 3201, // doomednum + S_MEMENTOSTP, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 0, // speed + 512*FRACUNIT, // radius + 16*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY|MF_SPECIAL, // flags + S_NULL // raisestate + }, + + { // MT_MEMENTOSPARTICLE + -1, // doomednum + S_THOK, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 32<extravalue1 = ((actor->extravalue1) ? (actor->extravalue1+1) : (P_RandomRange(0, TICRATE*3))); flip = ((actor->spawnpoint->options & 1) ? (3) : (0)); // flip adds 3 frames, which is the flipped version of the sign. @@ -8556,6 +8558,224 @@ void A_MayonakaArrow(mobj_t *actor) actor->momz = 0; return; } + +// A_MementosTPParticles +// Mementos teleporters particles effects. Short and simple. + +void A_MementosTPParticles(mobj_t *actor) +{ + mobj_t *particle; + mobj_t *mo2; + int i = 0; + thinker_t *th; + +#ifdef HAVE_BLUA + if (LUA_CallAction("A_MementosTPParticles", (actor))) + return; +#endif + + for (; i<4; i++) + { + particle = P_SpawnMobj(actor->x + (P_RandomRange(-256, 256)<y + (P_RandomRange(-256, 256)<z + (P_RandomRange(48, 256)<frame = 0; + particle->color = ((i%2) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK)); + particle->destscale = 1; + P_HomingAttack(particle, actor); + } + + // Although this is mostly used to spawn particles, we will also save the OTHER teleport inside actor->target. That way teleporting doesn't require a thinker iteration. + // Doesn't seem like much given the small amount of mobjs this map has but heh. + if (!actor->target) + { + for (th = thinkercap.next; th != &thinkercap; th = th->next) + { + if (th->function.acp1 != (actionf_p1)P_MobjThinker) + continue; + + mo2 = (mobj_t *)th; + if (mo2->type == MT_MEMENTOSTP && mo2 != actor) + { + P_SetTarget(&actor->target, mo2); // The main target we're pursing. + break; + } + } + } +} + +// A_ReaperThinker +// Mementos's Reaper's thinker. A huge pain in the Derek Bum to translate from Lua to this shite if you ask me. + +void A_ReaperThinker(mobj_t *actor) +{ + mobj_t *particle; // particles to spawn + int i = 0; // for loops + angle_t an = ANGLE_22h; // Reminder that angle constants suck. + + //Waypoint stuff: + mobj_t *mo2; + thinker_t *th; + + //Player targetting stuff: + INT32 maxscore = 0; // we target the player with the highest score so yeah there you go. + player_t *player; // used as a shortcut in a loop. + mobj_t *targetplayermo; // the player mo we can eventually target, or whatever. + + +#ifdef HAVE_BLUA + if (LUA_CallAction("A_ReaperThinker", (actor))) + return; +#endif + + // We don't have custom variables or whatever so we'll do with whatever the fuck we have left. + + if (actor->health == 1000) // if health is 1000, set it to a small scale and have it start growing with destscale. Then set the health to uh, not 1000. + { + actor->scale = 1; + actor->destscale = 2<scalespeed = FRACUNIT/24; // Should take a bit less than 2 seconds to fully grow. + S_StartSound(NULL, sfx_chain); + actor->health--; // now we have 999 health, so that above won't happen again. Awesome. + } + + if (actor->scale < 2<x + (P_RandomRange(-60, 60)<y + (P_RandomRange(-60, 60)<z, MT_THOK); + particle->momz = 20<color = ((i%2 !=0) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK)); + particle->frame = 0; + P_SetScale(particle, FRACUNIT/2); + } + + // Spawn particles in some edgy circle or w/e. + + if (leveltime%5 != 0) // spawn the thing under that every tic. + return; + + i=0; + for (; i<15; i++) // spawn in a circle formation or w/e. + { + particle = P_SpawnMobj(actor->x, actor->y, actor->z, MT_THOK); + particle->momz = 20<color = ((i%2 !=0) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK)); + particle->frame = 0; + P_SetScale(particle, FRACUNIT/2); + P_InstaThrust(particle, an*i, 30<flags = MF_NOGRAVITY|MF_PAIN|MF_SPECIAL|MF_NOCLIP|MF_NOCLIPHEIGHT; // set our flags to be a damaging thing. + + if (!actor->target) + { + if (actor->hnext) + { + P_SetTarget(&actor->target, actor->hnext); // Default back to last waypoint. + return; + } + + // We have no target and oughta find one, so let's scan through thinkers for a waypoint of angle 0, or something. + for (th = thinkercap.next; th != &thinkercap; th = th->next) + { + if (th->function.acp1 != (actionf_p1)P_MobjThinker) + continue; + + mo2 = (mobj_t *)th; + + if (mo2->type == MT_REAPERWAYPOINT && mo2->spawnpoint->angle == 0) + { + P_SetTarget(&actor->target, mo2); // The main target we're pursing. + P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! + actor->extravalue1 = 0; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. + if (!actor->tracer) // If we already have a tracer (Waypoint #0), don't do anything. + P_SetTarget(&actor->tracer, mo2); // Because our target might be a player OR a waypoint, we need some sort of fallback option. This will always be waypoint 0. + + break; + } + } + } + else // Awesome, we now have a target. + { + // Follow target: + P_InstaThrust(actor, R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y), 20<angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y); + + // The player we should target if it's near us: + i = 0; + for (; ilastlook]; + if (player && player->mo && player->kartstuff[k_bumper] && player->score >= maxscore) + { + targetplayermo = player->mo; + maxscore = player->score; + } + } + + // Try to target that player: + if (targetplayermo) + { + if (P_LookForPlayers(actor, false, false, 1024<target == targetplayermo && actor->target && !actor->target->player->powers[pw_flashing] + && !actor->target->player->kartstuff[k_invincibilitytimer] + && !actor->target->player->kartstuff[k_growshrinktimer] + && !actor->target->player->kartstuff[k_spinouttimer])) + P_SetTarget(&actor->target, actor->hnext); + // if the above isn't correct, then we should go back to targetting waypoints or something. + } + } + + // Waypoint behavior. + if (actor->target->type == MT_REAPERWAYPOINT) + { + + if (R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) < 22<target, NULL); // remove target so we can default back to first waypoint if things go ham. + + // If we reach close to a waypoint, then we should go to the NEXT one. + for (th = thinkercap.next; th != &thinkercap; th = th->next) + { + if (th->function.acp1 != (actionf_p1)P_MobjThinker) + continue; + + mo2 = (mobj_t *)th; + + if (mo2->type == MT_REAPERWAYPOINT && mo2->spawnpoint->angle == actor->extravalue1+1) + { + P_SetTarget(&actor->target, mo2); // The main target we're pursing. + P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! + actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. + break; + } + } + } + + + if (!actor->target) // If we have no target, revert back to waypoint 0. + { + actor->extravalue1 = 0; + P_SetTarget(&actor->target, actor->tracer); + } + } + else // if our target ISN'T a waypoint, then it can only be a player. + { + if (!P_CheckSight(actor, actor->target) || R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) > 1024<target, actor->hnext); + } + } +} + //} // Function: A_OrbitNights diff --git a/src/p_inter.c b/src/p_inter.c index 5e532c61..fc0fc53b 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -378,6 +378,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // We now identify by object type, not sprite! Tails 04-11-2001 switch (special->type) { + case MT_MEMENTOSTP: // Mementos teleport + // Teleport player to the other teleporter (special->target). We'll assume there's always only ever 2. + if (!special->target) + return; // foolproof crash prevention check!!!!! + + P_TeleportMove(player->mo, special->target->x, special->target->y, special->target->z + (48<mo->angle = special->target->angle; + P_SetObjectMomZ(player->mo, 12<mo, player->mo->angle, 20<kartstuff[k_itemamount] && player->kartstuff[k_itemtype] != special->threshold)) return; diff --git a/src/sounds.c b/src/sounds.c index 625522be..e1bf870b 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -815,6 +815,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"zio3", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"wind1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"fire2", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, + {"chain", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"mcitm1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"chaooo", false, 110, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, diff --git a/src/sounds.h b/src/sounds.h index ccd99e99..eedc7f38 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -890,6 +890,7 @@ typedef enum sfx_zio3, sfx_wind1, sfx_fire2, + sfx_chain, sfx_mcitm1, sfx_chaooo, sfx_itfree, From 1bd7959b2055988a6cafea9451d5b75cf17aca4c Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Sun, 21 Oct 2018 10:05:05 +0200 Subject: [PATCH 03/33] ReaperThinker: Changed the conditions in the th iterations and moved that i=0 at the start of the loop. --- src/p_enemy.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 7bfeb0d5..4a89423c 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8687,27 +8687,29 @@ void A_ReaperThinker(mobj_t *actor) mo2 = (mobj_t *)th; - if (mo2->type == MT_REAPERWAYPOINT && mo2->spawnpoint->angle == 0) + if (mo2->type != MT_REAPERWAYPOINT) + continue; + if (mo2->spawnpoint->angle != 0) + continue; + + P_SetTarget(&actor->target, mo2); // The main target we're pursing. + P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! + actor->extravalue1 = 0; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. + if (!actor->tracer) // If we already have a tracer (Waypoint #0), don't do anything. { - P_SetTarget(&actor->target, mo2); // The main target we're pursing. - P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! - actor->extravalue1 = 0; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. - if (!actor->tracer) // If we already have a tracer (Waypoint #0), don't do anything. - P_SetTarget(&actor->tracer, mo2); // Because our target might be a player OR a waypoint, we need some sort of fallback option. This will always be waypoint 0. - + P_SetTarget(&actor->tracer, mo2); // Because our target might be a player OR a waypoint, we need some sort of fallback option. This will always be waypoint 0. break; } } } else // Awesome, we now have a target. - { + { // Follow target: P_InstaThrust(actor, R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y), 20<angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y); // The player we should target if it's near us: - i = 0; - for (; itype == MT_REAPERWAYPOINT && mo2->spawnpoint->angle == actor->extravalue1+1) - { - P_SetTarget(&actor->target, mo2); // The main target we're pursing. - P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! - actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. + if (mo2->type != MT_REAPERWAYPOINT) + continue; + if (mo2->spawnpoint->angle != actor->extravalue1+1) + continue; + + P_SetTarget(&actor->target, mo2); // The main target we're pursing. + P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! + actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. break; - } } } From 9e4937d07f339d3c5727aa1d5ecd90c8186da012 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 15:06:07 -0400 Subject: [PATCH 04/33] Don't f12 time over'd players --- src/g_game.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index 617712f7..f6115617 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1840,6 +1840,9 @@ boolean G_Responder(event_t *ev) if (players[displayplayer].exiting) continue; + if (players[displayplayer].pflags & PF_TIMEOVER) + continue; + // I don't know if we want this actually, but I'll humor the suggestion anyway if (G_BattleGametype()) { From 9cd47643dfac9cc33c86c7dcb8df1637109f111b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 15:08:04 -0400 Subject: [PATCH 05/33] Falling rocks only collide with players and other rocks --- src/p_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index 468a5c67..9c343944 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1077,7 +1077,8 @@ static boolean PIT_CheckThing(mobj_t *thing) //} - if (thing->type == MT_FALLINGROCK || tmthing->type == MT_FALLINGROCK) + if ((thing->type == MT_FALLINGROCK && (tmthing->player || tmthing->type == MT_FALLINGROCK)) + || (tmthing->type == MT_FALLINGROCK && (thing->player || thing->type == MT_FALLINGROCK))) { // see if it went over / under if (tmthing->z > thing->z + thing->height) From 89887ccf0d2f536a796dd0367e978a3507f32dda Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 16:08:46 -0400 Subject: [PATCH 06/33] Modify distx/disty to ensure it never goes too low --- src/k_kart.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index f13f1742..04534568 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1052,7 +1052,6 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) mobj_t *fx; fixed_t momdifx, momdify; fixed_t distx, disty; - //fixed_t nobumpx = 0, nobumpy = 0; fixed_t dot, p; fixed_t mass1, mass2; @@ -1101,20 +1100,28 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) momdify = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedy); } - /*if (mass1 == 0 && mass2 > 0) - { - nobumpx = mobj2->momx; - nobumpy = mobj2->momy; - } - else if (mass2 == 0 && mass1 > 0) - { - nobumpx = mobj1->momx; - nobumpy = mobj1->momy; - }*/ - + // Adds the OTHER player's momentum, so that it reduces the chance of you being "inside" the other object distx = (mobj1->x + mobj2->momx) - (mobj2->x + mobj1->momx); disty = (mobj1->y + mobj2->momy) - (mobj2->y + mobj1->momy); + { // Don't allow dist to get WAY too low, that it pushes you stupidly huge amounts, or backwards... + fixed_t dist = P_AproxDistance(distx, disty); + fixed_t nx = FixedDiv(distx, dist); + fixed_t ny = FixedDiv(disty, dist); + + if (P_AproxDistance(distx, disty) < 3*mobj1->radius/4) + { + distx = FixedMul(mobj1->radius/2, nx); + disty = FixedMul(mobj1->radius/2, ny); + } + + if (P_AproxDistance(distx, disty) < 3*mobj2->radius/4) + { + distx = FixedMul(mobj2->radius/2, nx); + disty = FixedMul(mobj2->radius/2, ny); + } + } + if (distx == 0 && disty == 0) { // if there's no distance between the 2, they're directly on top of each other, don't run this From ebb0733a3cc2bb0a3c75da37668d32c1091a818b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 16:16:57 -0400 Subject: [PATCH 07/33] Fix camera not noclipping FOFs --- src/p_user.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index a6566cce..8dad7a6e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8162,10 +8162,13 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall fixed_t x, y, z, dist, height, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight; fixed_t pan, xpan, ypan; INT32 camrotate; - boolean camstill, cameranoclip, lookback; + boolean camstill, lookback; mobj_t *mo; - subsector_t *newsubsec; fixed_t f1, f2; +#ifndef NOCLIPCAM + boolean cameranoclip; + subsector_t *newsubsec; +#endif // We probably shouldn't move the camera if there is no player or player mobj somehow if (!player || !player->mo) @@ -8173,9 +8176,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall mo = player->mo; -#ifdef NOCLIPCAM - cameranoclip = true; // We like camera noclip! -#else +#ifndef NOCLIPCAM cameranoclip = ((player->pflags & (PF_NOCLIP|PF_NIGHTSMODE)) || (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)) // Noclipping player camera noclips too!! || (leveltime < introtime)); // Kart intro cam @@ -8411,6 +8412,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall else z = mo->z + pviewheight + camheight; +#ifndef NOCLIPCAM // Disable all z-clipping for noclip cam // move camera down to move under lower ceilings newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1)); @@ -8608,6 +8610,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (thiscam->z < thiscam->floorz && !cameranoclip) thiscam->z = thiscam->floorz; +#endif // NOCLIPCAM // point viewed by the camera // this point is just 64 unit forward the player From 3ec228d34f560ab8b295b4979734dce81f5f9231 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 16:22:41 -0400 Subject: [PATCH 08/33] No more cheesing Shrink by dying (If that was kept, we'd see it exploited all the time on release :V) --- src/g_game.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index f6115617..f4a62b09 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2359,6 +2359,7 @@ void G_PlayerReborn(INT32 player) INT32 itemamount; INT32 itemroulette; INT32 roulettetype; + INT32 growshrinktimer; INT32 bumper; INT32 comebackpoints; INT32 wanted; @@ -2422,6 +2423,7 @@ void G_PlayerReborn(INT32 player) roulettetype = 0; itemtype = 0; itemamount = 0; + growshrinktimer = 0; bumper = (G_BattleGametype() ? cv_kartbumpers.value : 0); comebackpoints = 0; wanted = 0; @@ -2445,6 +2447,9 @@ void G_PlayerReborn(INT32 player) itemamount = players[player].kartstuff[k_itemamount]; } + // Keep Shrink status, remove Grow status + growshrinktimer = min(players[player].kartstuff[k_growshrinktimer], 0); + bumper = players[player].kartstuff[k_bumper]; comebackpoints = players[player].kartstuff[k_comebackpoints]; wanted = players[player].kartstuff[k_wanted]; @@ -2509,6 +2514,7 @@ void G_PlayerReborn(INT32 player) p->kartstuff[k_roulettetype] = roulettetype; p->kartstuff[k_itemtype] = itemtype; p->kartstuff[k_itemamount] = itemamount; + p->kartstuff[k_growshrinktimer] = growshrinktimer; p->kartstuff[k_bumper] = bumper; p->kartstuff[k_comebackpoints] = comebackpoints; p->kartstuff[k_comebacktimer] = comebacktime; From a1da768a87f9dd1e9e5629e224e79277dc6cd803 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 16:26:24 -0400 Subject: [PATCH 09/33] Keep specator join request on respawn --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index f4a62b09..27767021 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2372,7 +2372,7 @@ void G_PlayerReborn(INT32 player) exiting = players[player].exiting; jointime = players[player].jointime; spectator = players[player].spectator; - pflags = (players[player].pflags & (PF_TIMEOVER|PF_FLIPCAM|PF_TAGIT|PF_TAGGED|PF_ANALOGMODE)); + pflags = (players[player].pflags & (PF_TIMEOVER|PF_FLIPCAM|PF_TAGIT|PF_TAGGED|PF_ANALOGMODE|PF_WANTSTOJOIN)); // As long as we're not in multiplayer, carry over cheatcodes from map to map if (!(netgame || multiplayer)) From 40b9644e0c97a37d0ada389e81240d04e20273ca Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 16:32:06 -0400 Subject: [PATCH 10/33] Use COM_ImmedExecute("restartaudio") instead of duplicated code --- src/d_netcmd.c | 6 +++++- src/m_menu.c | 17 +---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 120ffc55..0b885ab3 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -4855,9 +4855,13 @@ static void Command_RestartAudio_f(void) I_SetSfxVolume(cv_soundvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value); //I_SetMIDIMusicVolume(cv_midimusicvolume.value); + + S_StartSound(NULL, sfx_strpst); + if (Playing()) // Gotta make sure the player is in a level P_RestoreMusic(&players[consoleplayer]); - + else + S_ChangeMusicInternal("titles", looptitle); } /** Quits a game and returns to the title screen. diff --git a/src/m_menu.c b/src/m_menu.c index 2e2a79e0..8adcc954 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -9043,22 +9043,7 @@ static void M_ToggleDigital(INT32 choice) static void M_RestartAudio(void) { - S_StopMusic(); - I_ShutdownMusic(); - I_ShutdownSound(); - I_StartupSound(); - I_InitMusic(); - - I_SetSfxVolume(cv_soundvolume.value); - I_SetDigMusicVolume(cv_digmusicvolume.value); - //I_SetMIDIMusicVolume(cv_midimusicvolume.value); - - S_StartSound(NULL, sfx_strpst); - - if (Playing()) // Gotta make sure the player is in a level - P_RestoreMusic(&players[consoleplayer]); - else - S_ChangeMusicInternal("titles", looptitle); + COM_ImmedExecute("restartaudio"); } // =============== From 685ccf53ccbe7177be30de7c15606b67dd89b47c Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 17:03:02 -0400 Subject: [PATCH 11/33] Remove restart audio system from the menu Learned the cause of the seemingly random crashes it causes; doesn't seem easy to fix, so it can stay a relatively-unknown console command until it does --- src/m_menu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 8adcc954..7f71a7c7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1315,7 +1315,7 @@ static menuitem_t OP_SoundOptionsMenu[] = { {IT_KEYHANDLER|IT_STRING, NULL, "SFX", M_ToggleSFX, 10}, {IT_STRING|IT_CVAR|IT_CV_SLIDER, - NULL, "SFX Volume", &cv_soundvolume, 18}, + NULL, "SFX Volume", &cv_soundvolume, 18}, {IT_KEYHANDLER|IT_STRING, NULL, "Music", M_ToggleDigital, 30}, {IT_STRING|IT_CVAR|IT_CV_SLIDER, @@ -1330,16 +1330,16 @@ static menuitem_t OP_SoundOptionsMenu[] = NULL, "CD Volume", &cd_volume, 40}, #endif*/ - {IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 50}, + //{IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 50}, - {IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 65}, - {IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 75}, + {IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 50}, + {IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 60}, - {IT_STRING|IT_CVAR, NULL, "Chat sounds", &cv_chatnotifications, 90}, - {IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 100}, - {IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 110}, + {IT_STRING|IT_CVAR, NULL, "Chat sounds", &cv_chatnotifications, 75}, + {IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 85}, + {IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 95}, - {IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 125}, + {IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 110}, }; /*static menuitem_t OP_DataOptionsMenu[] = From 3dc02a4eb480ed95a4327a9a296167be22bfe820 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 17:24:58 -0400 Subject: [PATCH 12/33] Minor mistakes on my part --- src/k_kart.c | 12 ++++++------ src/m_menu.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 04534568..ecba2026 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1109,16 +1109,16 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) fixed_t nx = FixedDiv(distx, dist); fixed_t ny = FixedDiv(disty, dist); - if (P_AproxDistance(distx, disty) < 3*mobj1->radius/4) + if (P_AproxDistance(distx, disty) < (3*mobj1->radius)/4) { - distx = FixedMul(mobj1->radius/2, nx); - disty = FixedMul(mobj1->radius/2, ny); + distx = FixedMul((3*mobj1->radius)/4, nx); + disty = FixedMul((3*mobj1->radius)/4, ny); } - if (P_AproxDistance(distx, disty) < 3*mobj2->radius/4) + if (P_AproxDistance(distx, disty) < (3*mobj2->radius)/4) { - distx = FixedMul(mobj2->radius/2, nx); - disty = FixedMul(mobj2->radius/2, ny); + distx = FixedMul((3*mobj2->radius)/4, nx); + disty = FixedMul((3*mobj2->radius)/4, ny); } } diff --git a/src/m_menu.c b/src/m_menu.c index 7f71a7c7..144ed58c 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -314,7 +314,7 @@ menu_t OP_SoundOptionsDef; static void M_ToggleSFX(INT32 choice); static void M_ToggleDigital(INT32 choice); //static void M_ToggleMIDI(INT32 choice); -static void M_RestartAudio(void); +//static void M_RestartAudio(void); //Misc menu_t /*OP_DataOptionsDef,*/ OP_ScreenshotOptionsDef, OP_EraseDataDef; @@ -9041,10 +9041,10 @@ static void M_ToggleDigital(INT32 choice) } }*/ -static void M_RestartAudio(void) +/*static void M_RestartAudio(void) { COM_ImmedExecute("restartaudio"); -} +}*/ // =============== // VIDEO MODE MENU From 7aa8b94b22089e0889322f8466b9b526b3d81cff Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Oct 2018 17:48:21 -0400 Subject: [PATCH 13/33] Cam follows faster in 2P --- src/p_user.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 8dad7a6e..ccbf6c66 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8637,7 +8637,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall { thiscam->momx = x - thiscam->x; thiscam->momy = y - thiscam->y; - thiscam->momz = FixedMul(z - thiscam->z, camspeed/2); + if (splitscreen == 1) // Wide-screen needs to follow faster, due to a smaller vertical:horizontal ratio of screen space + thiscam->momz = FixedMul(z - thiscam->z, (3*camspeed)/4); + else + thiscam->momz = FixedMul(z - thiscam->z, camspeed/2); } thiscam->pan = pan; From e8d424784ca6322ebf7d218deeac91e74ceb20e3 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Tue, 23 Oct 2018 17:59:19 +0200 Subject: [PATCH 14/33] Jack In The Box + Color Drive hardcode --- src/info.c | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++- src/info.h | 29 ++++++++++ 2 files changed, 181 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index 231f672a..62e949cf 100644 --- a/src/info.c +++ b/src/info.c @@ -61,7 +61,8 @@ char sprnames[NUMSPRITES + 1][5] = "DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM", "SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB", "ARRO","ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK", - "LZI1","LZI2","KLIT", "SPTL", "ENM1", "GARU", "MARR", "REAP", "VIEW" + "LZI1","LZI2","KLIT", "SPTL", "ENM1", "GARU", "MARR", "REAP", "JITB", + "CDMO", "CDBU", "VIEW" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -3087,7 +3088,21 @@ state_t states[NUMSTATES] = {SPR_NULL, 0, TICRATE*130, {NULL}, 0, 0, S_REAPER}, //S_REAPER_INVIS {SPR_REAP, 0, 1, {A_ReaperThinker}, 0, 0, S_REAPER}, //S_REAPER {SPR_NULL, 0, 1, {A_MementosTPParticles}, 0, 0, S_MEMENTOSTP}, //S_MEMENTOSTP - + + //JackInTheBox + {SPR_JITB, 0, 4, {NULL}, 0, 0, S_JITB2}, // S_JITB1 + {SPR_JITB, 1, 4, {NULL}, 0, 0, S_JITB3}, // S_JITB2 + {SPR_JITB, 2, 4, {NULL}, 0, 0, S_JITB4}, // S_JITB3 + {SPR_JITB, 3, 4, {NULL}, 0, 0, S_JITB5}, // S_JITB4 + {SPR_JITB, 2, 4, {NULL}, 0, 0, S_JITB6}, // S_JITB5 + {SPR_JITB, 1, 4, {NULL}, 0, 0, S_JITB1}, // S_JITB6 + + // Color Drive Stuff: + {SPR_CDMO, 0, -1, {NULL}, 0, 0, S_CDMOONSP}, // S_CDMOONSP + {SPR_CDBU, 0, -1, {NULL}, 0, 0, S_CDBUSHSP}, // S_CDBUSHSP + {SPR_CDBU, 1, -1, {NULL}, 0, 0, S_CDTREEASP}, // S_CDTREEASP + {SPR_CDBU, 2, -1, {NULL}, 0, 0, S_CDTREEBSP}, // S_CDTREEBSP + #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK #endif @@ -17451,6 +17466,141 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY, // flags S_NULL // raisestate }, + + { // MT_JACKINTHEBOX + 1601, // doomednum + S_JITB4, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // 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 + 32< Date: Tue, 23 Oct 2018 18:31:34 +0200 Subject: [PATCH 15/33] I'm an idiot and COMPLETELY forgot about dehacked, also removed whitespaces --- src/dehacked.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ src/info.c | 56 +++++++++++++++++++++++++------------------------- src/info.h | 28 ++++++++++++------------- 3 files changed, 94 insertions(+), 42 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 30def251..3fa5f49c 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6774,6 +6774,38 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_KLIT11", "S_KLIT12", + // Midnight Channel stuff: + "S_SPOTLIGHT", // Spotlight decoration + "S_RANDOMSHADOW", // Random Shadow. They're static and don't do nothing. + "S_GARU1", + "S_GARU2", + "S_GARU3", + "S_TGARU", + "S_TGARU1", + "S_TGARU2", + "S_TGARU3", // Wind attack used by Roaming Shadows on Players. + "S_ROAMINGSHADOW", // Roaming Shadow (the one that uses above's wind attack or smth) + "S_MAYONAKAARROW", // Arrow sign + + // Mementos stuff: + "S_REAPER_INVIS", // Reaper waiting for spawning + "S_REAPER", // Reaper main frame where its thinker is handled + "S_MEMENTOSTP", // Mementos teleporter state. (Used for spawning particles) + + // JackInTheBox + "S_JITB1", + "S_JITB2", + "S_JITB3", + "S_JITB4", + "S_JITB5", + "S_JITB6", + + // Color Drive + "S_CDMOONSP", + "S_CDBUSHSP", + "S_CDTREEASP", + "S_CDTREEBSP", + #ifdef SEENAMES "S_NAMECHECK", #endif @@ -7426,6 +7458,26 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_KARMAHITBOX", "MT_KARMAWHEEL", + + // Midnight Channel stuff: + "MT_SPOTLIGHT", // Spotlight Object + "MT_RANDOMSHADOW", // Random static Shadows. + "MT_ROAMINGSHADOW", // Roaming Shadows. + "MT_MAYONAKAARROW", // Arrow static signs for Mayonaka + + // Mementos stuff + "MT_REAPERWAYPOINT", + "MT_REAPER", + "MT_MEMENTOSTP", + "MT_MEMENTOSPARTICLE", + + "MT_JACKINTHEBOX", + + // Color Drive: + "MT_CDMOON", + "MT_CDBUSH", + "MT_CDTREEA", + "MT_CDTREEB", #ifdef SEENAMES "MT_NAMECHECK", diff --git a/src/info.c b/src/info.c index 62e949cf..ff15d0c2 100644 --- a/src/info.c +++ b/src/info.c @@ -3013,9 +3013,9 @@ state_t states[NUMSTATES] = {SPR_PBOM, FF_ANIMATE, -1, {NULL}, 3, 3, S_NULL}, // S_PLAYERBOMB {SPR_RNDM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERITEM {SPR_FITM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERFAKE - - {SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_KARMAWHEEL + {SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_KARMAWHEEL + // Oh no it's annoying lightning states....... // Lightning Sparks (it's the ones we'll use for the radius) {SPR_KSPK, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_KSPARK2}, // S_KSPARK1 @@ -3031,7 +3031,7 @@ state_t states[NUMSTATES] = {SPR_KSPK, FF_TRANS50|FF_FULLBRIGHT|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KSPARK12}, // S_KSPARK11 {SPR_NULL, FF_FULLBRIGHT, 1, {A_LightningFollowPlayer}, 0, 0, S_KSPARK13}, // S_KSPARK12 {SPR_KSPK, FF_TRANS60|FF_FULLBRIGHT|6, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_KSPARK13 - + // The straight bolt... {SPR_LZI1, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO12}, // S_LZIO11 {SPR_NULL, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO13}, // S_LZIO12 @@ -3042,7 +3042,7 @@ state_t states[NUMSTATES] = {SPR_NULL, 0, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO18}, // S_LZIO17 {SPR_LZI1, FF_TRANS50|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO19}, // S_LZIO18 {SPR_LZI1, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO19 - + {SPR_NULL, FF_FULLBRIGHT, 6, {A_LightningFollowPlayer}, 0, 0, S_LZIO22}, // S_LZIO21 {SPR_LZI2, FF_FULLBRIGHT|1, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO23}, // S_LZIO22 {SPR_LZI2, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO24}, // S_LZIO23 @@ -3052,7 +3052,7 @@ state_t states[NUMSTATES] = {SPR_LZI2, FF_TRANS30|FF_FULLBRIGHT|2, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO28}, // S_LZIO27 {SPR_NULL, 0, 4, {A_LightningFollowPlayer}, 0, 0, S_LZIO29}, // S_LZIO28 {SPR_LZI2, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO29 - + // The slanted bolt. Man these states are boring as all heck to do. {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT2}, // S_KLIT1 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT3}, // S_KLIT2 @@ -3066,29 +3066,29 @@ state_t states[NUMSTATES] = {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT11}, // S_KLIT10 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT12}, // S_KLIT11 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12 - + // Midnight Channel stuff, yay more boring states! {SPR_SPTL, 0, -1, {NULL}, 0, 0, S_SPOTLIGHT}, // S_SPOTLIGHT {SPR_ENM1, 0, 1, {A_RandomShadowFrame}, 0, 0, S_RANDOMSHADOW}, // S_RANDOMSHADOW - + {SPR_GARU, 0, 2, {NULL}, 0, 0, S_GARU2}, // S_GARU1 {SPR_GARU, 1, 2, {NULL}, 0, 0, S_GARU3}, // S_GARU2 {SPR_GARU, 2, 2, {NULL}, 0, 0, S_NULL}, // S_GARU3 - + {SPR_NULL, 0, 2, {NULL}, 0, 0, S_TGARU1}, // S_TGARU0 {SPR_GARU, FF_TRANS30, 2, {NULL}, 0, 0, S_GARU2}, // S_TGARU1 {SPR_GARU, 1|FF_TRANS30, 2, {NULL}, 0, 0, S_GARU3}, // S_TGARU2 {SPR_GARU, 2|FF_TRANS30, 2, {NULL}, 0, 0, S_NULL}, // S_TGARU3 - + {SPR_ENM1, 2, 1, {A_RoamingShadowThinker}, 0, 0, S_ROAMINGSHADOW}, //S_ROAMINGSHADOW - + {SPR_MARR, 0, 1, {A_MayonakaArrow}, 0, 0, S_MAYONAKAARROW}, //S_MAYONAKAARROW - + //Mementos stuff {SPR_NULL, 0, TICRATE*130, {NULL}, 0, 0, S_REAPER}, //S_REAPER_INVIS {SPR_REAP, 0, 1, {A_ReaperThinker}, 0, 0, S_REAPER}, //S_REAPER {SPR_NULL, 0, 1, {A_MementosTPParticles}, 0, 0, S_MEMENTOSTP}, //S_MEMENTOSTP - + //JackInTheBox {SPR_JITB, 0, 4, {NULL}, 0, 0, S_JITB2}, // S_JITB1 {SPR_JITB, 1, 4, {NULL}, 0, 0, S_JITB3}, // S_JITB2 @@ -3096,13 +3096,13 @@ state_t states[NUMSTATES] = {SPR_JITB, 3, 4, {NULL}, 0, 0, S_JITB5}, // S_JITB4 {SPR_JITB, 2, 4, {NULL}, 0, 0, S_JITB6}, // S_JITB5 {SPR_JITB, 1, 4, {NULL}, 0, 0, S_JITB1}, // S_JITB6 - + // Color Drive Stuff: {SPR_CDMO, 0, -1, {NULL}, 0, 0, S_CDMOONSP}, // S_CDMOONSP {SPR_CDBU, 0, -1, {NULL}, 0, 0, S_CDBUSHSP}, // S_CDBUSHSP {SPR_CDBU, 1, -1, {NULL}, 0, 0, S_CDTREEASP}, // S_CDTREEASP {SPR_CDBU, 2, -1, {NULL}, 0, 0, S_CDTREEBSP}, // S_CDTREEBSP - + #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK #endif @@ -17247,9 +17247,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOTHINK|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_DONTENCOREMAP, // flags S_NULL // raisestate }, - + // Midnight Channel stuff: - + { // MT_SPOTLIGHT 3124, // doomednum S_SPOTLIGHT, // spawnstate @@ -17276,7 +17276,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOTHINK|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_RANDOMSHADOW 3120, // doomednum S_RANDOMSHADOW, // spawnstate @@ -17303,7 +17303,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_PAIN, // flags S_NULL // raisestate }, - + { // MT_ROAMINGSHADOW 3121, // doomednum S_ROAMINGSHADOW, // spawnstate @@ -17330,7 +17330,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SOLID|MF_PAIN|MF_SPECIAL|MF_RUNSPAWNFUNC, // flags S_NULL // raisestate }, - + { // MT_MAYONAKAARROW 3122, // doomednum S_MAYONAKAARROW, // spawnstate @@ -17357,7 +17357,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags S_NULL // raisestate }, - + // Mementos stuff { // MT_REAPERWAYPOINT 3199, // doomednum @@ -17385,7 +17385,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_REAPER 3202, // doomednum S_REAPER_INVIS, // spawnstate @@ -17412,7 +17412,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_MEMENTOSTP 3201, // doomednum S_MEMENTOSTP, // spawnstate @@ -17439,7 +17439,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY|MF_SPECIAL, // flags S_NULL // raisestate }, - + { // MT_MEMENTOSPARTICLE -1, // doomednum S_THOK, // spawnstate @@ -17466,7 +17466,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_JACKINTHEBOX 1601, // doomednum S_JITB4, // spawnstate @@ -17493,7 +17493,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY, // flags S_NULL // raisestate }, - + { // MT_CDMOON 2499, // doomednum S_CDMOONSP, // spawnstate @@ -17520,7 +17520,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_CDBUSH 2498, // doomednum S_CDBUSHSP, // spawnstate @@ -17547,7 +17547,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_CDTREEA 2496, // doomednum S_CDTREEASP, // spawnstate @@ -17574,7 +17574,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags S_NULL // raisestate }, - + { // MT_CDTREEB 2497, // doomednum S_CDTREEBSP, // spawnstate diff --git a/src/info.h b/src/info.h index ec31e29f..24a1ae7b 100644 --- a/src/info.h +++ b/src/info.h @@ -657,24 +657,24 @@ typedef enum sprite SPR_LZI1, // Lightning that falls on the player for lightning shield SPR_LZI2, // ditto SPR_KLIT, // You have a twisted mind. But this actually is for the diagonal lightning. - + // Midnight Channel stuff: SPR_SPTL, // Spotlight SPR_ENM1, // Shadows (Roaming and static) SPR_GARU, // Wind attack roaming shadows use. SPR_MARR, // Mayonaka Arrow - + //Mementos stuff: SPR_REAP, - + SPR_JITB, // Jack In The Box - + // Color Drive stuff: SPR_CDMO, SPR_CDBU, SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw! - + SPR_FIRSTFREESLOT, SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1, NUMSPRITES @@ -3632,7 +3632,7 @@ typedef enum state S_KLIT10, S_KLIT11, S_KLIT12, - + // Midnight Channel stuff: S_SPOTLIGHT, // Spotlight decoration S_RANDOMSHADOW, // Random Shadow. They're static and don't do nothing. @@ -3645,12 +3645,12 @@ typedef enum state S_TGARU3, // Wind attack used by Roaming Shadows on Players. S_ROAMINGSHADOW, // Roaming Shadow (the one that uses above's wind attack or smth) S_MAYONAKAARROW, // Arrow sign - + // Mementos stuff: S_REAPER_INVIS, // Reaper waiting for spawning S_REAPER, // Reaper main frame where its thinker is handled S_MEMENTOSTP, // Mementos teleporter state. (Used for spawning particles) - + // JackInTheBox S_JITB1, S_JITB2, @@ -3658,7 +3658,7 @@ typedef enum state S_JITB4, S_JITB5, S_JITB6, - + // Color Drive S_CDMOONSP, S_CDBUSHSP, @@ -4334,27 +4334,27 @@ typedef enum mobj_type MT_KARMAHITBOX, MT_KARMAWHEEL, - + // Midnight Channel stuff: MT_SPOTLIGHT, // Spotlight Object MT_RANDOMSHADOW, // Random static Shadows. MT_ROAMINGSHADOW, // Roaming Shadows. MT_MAYONAKAARROW, // Arrow static signs for Mayonaka - + // Mementos stuff MT_REAPERWAYPOINT, MT_REAPER, MT_MEMENTOSTP, MT_MEMENTOSPARTICLE, - + MT_JACKINTHEBOX, - + // Color Drive: MT_CDMOON, MT_CDBUSH, MT_CDTREEA, MT_CDTREEB, - + #ifdef SEENAMES MT_NAMECHECK, From 5224461184114c6e7fb46943dc7dea3ccfffd518 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Tue, 23 Oct 2018 18:35:42 +0200 Subject: [PATCH 16/33] another few whitepsaces i forgot from copypasting... --- src/dehacked.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 3fa5f49c..f541750b 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7458,27 +7458,27 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_KARMAHITBOX", "MT_KARMAWHEEL", - + // Midnight Channel stuff: "MT_SPOTLIGHT", // Spotlight Object "MT_RANDOMSHADOW", // Random static Shadows. "MT_ROAMINGSHADOW", // Roaming Shadows. "MT_MAYONAKAARROW", // Arrow static signs for Mayonaka - + // Mementos stuff "MT_REAPERWAYPOINT", "MT_REAPER", "MT_MEMENTOSTP", "MT_MEMENTOSPARTICLE", - + "MT_JACKINTHEBOX", - + // Color Drive: "MT_CDMOON", "MT_CDBUSH", "MT_CDTREEA", "MT_CDTREEB", - + #ifdef SEENAMES "MT_NAMECHECK", #endif From 017d606828cb7921d7e856304252e713e511ef26 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 23 Oct 2018 17:48:09 -0400 Subject: [PATCH 17/33] fzboom.wad hardcode --- src/d_player.h | 1 + src/dehacked.c | 32 +++++++++- src/info.c | 66 +++++++++++++++++--- src/info.h | 33 ++++++++++ src/k_kart.c | 2 + src/p_enemy.c | 50 ++++++++++++++- src/p_inter.c | 21 ++++++- src/p_mobj.c | 60 ++++++++++++++++++ src/p_user.c | 161 ++++++++++++------------------------------------- src/sounds.c | 4 +- src/y_inter.c | 6 +- 11 files changed, 298 insertions(+), 138 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index 02f7f45e..415ca67e 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -306,6 +306,7 @@ typedef enum k_accelboost, // Boost value smoothing for acceleration k_boostcam, // Camera push forward on boost k_destboostcam, // Ditto + k_timeovercam, // Camera timer for leaving behind or not k_aizdriftstrat, // Let go of your drift while boosting? Helper for the SICK STRATZ you have just unlocked k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem") diff --git a/src/dehacked.c b/src/dehacked.c index 60d38a63..ef86c336 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1837,7 +1837,9 @@ static actionpointer_t actionpointers[] = {{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart {{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart {{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart - {{A_LightningFollowPlayer}, "A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart + {{A_LightningFollowPlayer},"A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart + {{A_FZBoomFlash}, "A_FZBOOMFLASH"}, //SRB2kart + {{A_FZBoomSmoke}, "A_FZBOOMSMOKE"}, //SRB2kart {{A_OrbitNights}, "A_ORBITNIGHTS"}, {{A_GhostMe}, "A_GHOSTME"}, {{A_SetObjectState}, "A_SETOBJECTSTATE"}, @@ -6770,6 +6772,31 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_KLIT11", "S_KLIT12", + "S_FZEROSMOKE1", // F-Zero NO CONTEST explosion + "S_FZEROSMOKE2", + "S_FZEROSMOKE3", + "S_FZEROSMOKE4", + "S_FZEROSMOKE5", + + "S_FZEROBOOM1", + "S_FZEROBOOM2", + "S_FZEROBOOM3", + "S_FZEROBOOM4", + "S_FZEROBOOM5", + "S_FZEROBOOM6", + "S_FZEROBOOM7", + "S_FZEROBOOM8", + "S_FZEROBOOM9", + "S_FZEROBOOM10", + "S_FZEROBOOM11", + "S_FZEROBOOM12", + + "S_FZSLOWSMOKE1", + "S_FZSLOWSMOKE2", + "S_FZSLOWSMOKE3", + "S_FZSLOWSMOKE4", + "S_FZSLOWSMOKE5", + #ifdef SEENAMES "S_NAMECHECK", #endif @@ -7423,6 +7450,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_KARMAHITBOX", "MT_KARMAWHEEL", + "MT_FZEROBOOM", + #ifdef SEENAMES "MT_NAMECHECK", #endif @@ -7779,6 +7808,7 @@ static const char *const KARTSTUFF_LIST[] = { "ACCELBOOST", "BOOSTCAM", "DESTBOOSTCAM", + "TIMEOVERCAM", "AIZDRIFTSTRAT", "ITEMROULETTE", diff --git a/src/info.c b/src/info.c index 2efa68ab..e416bff6 100644 --- a/src/info.c +++ b/src/info.c @@ -61,7 +61,7 @@ char sprnames[NUMSPRITES + 1][5] = "DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM", "SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB", "ARRO","ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK", - "LZI1","LZI2","KLIT","VIEW" + "LZI1","LZI2","KLIT","FZSM","FZBM","FPRT","VIEW" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -3053,18 +3053,43 @@ state_t states[NUMSTATES] = {SPR_LZI2, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO29 // The slanted bolt. Man these states are boring as all heck to do. - {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT2}, // S_KLIT1 - {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT3}, // S_KLIT2 + {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT2}, // S_KLIT1 + {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT3}, // S_KLIT2 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|1, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT4}, // S_KLIT3 - {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT5}, // S_KLIT4 + {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT5}, // S_KLIT4 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|2, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT6}, // S_KLIT5 - {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT7}, // S_KLIT6 + {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT7}, // S_KLIT6 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|3, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT8}, // S_KLIT7 - {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT9}, // S_KLIT8 + {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT9}, // S_KLIT8 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|4, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT10}, // S_KLIT9 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT11}, // S_KLIT10 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT12}, // S_KLIT11 - {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12 + {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12 + + {SPR_FZSM, 0, 4, {NULL}, 0, 0, S_FZEROSMOKE2}, // S_FZEROSMOKE1 + {SPR_FZSM, 1, 4, {NULL}, 0, 0, S_FZEROSMOKE3}, // S_FZEROSMOKE2 + {SPR_FZSM, 2, 4, {NULL}, 0, 0, S_FZEROSMOKE4}, // S_FZEROSMOKE3 + {SPR_FZSM, 3, 4, {NULL}, 0, 0, S_FZEROSMOKE5}, // S_FZEROSMOKE4 + {SPR_FZSM, 4, 4, {NULL}, 0, 0, S_NULL}, // S_FZEROSMOKE5 + + {SPR_FZBM, 0, 2, {NULL}, 0, 0, S_FZEROBOOM2}, // S_FZEROBOOM1 + {SPR_FZBM, 1, 2, {NULL}, 0, 0, S_FZEROBOOM3}, // S_FZEROBOOM2 + {SPR_FZBM, 2, 2, {NULL}, 0, 0, S_FZEROBOOM4}, // S_FZEROBOOM3 + {SPR_FZBM, 3, 2, {A_FZBoomFlash}, 0, 0, S_FZEROBOOM5}, // S_FZEROBOOM4 + {SPR_FZBM, 2, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM6}, // S_FZEROBOOM5 + {SPR_FZBM, 1, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM7}, // S_FZEROBOOM6 + {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM8}, // S_FZEROBOOM7 + {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 2, 0, S_FZEROBOOM9}, // S_FZEROBOOM8 + {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 3, 0, S_FZEROBOOM10}, // S_FZEROBOOM9 + {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 2, 0, S_FZEROBOOM11}, // S_FZEROBOOM10 + {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM12}, // S_FZEROBOOM11 + {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 0, 0, S_NULL}, // S_FZEROBOOM12 + + {SPR_SMOK, FF_TRANS30, 30, {NULL}, 0, 0, S_FZSLOWSMOKE2}, // S_FZSLOWSMOKE1 + {SPR_SMOK, FF_TRANS30|1, 30, {NULL}, 0, 0, S_FZSLOWSMOKE3}, // S_FZSLOWSMOKE2 + {SPR_SMOK, FF_TRANS30|2, 30, {NULL}, 0, 0, S_FZSLOWSMOKE4}, // S_FZSLOWSMOKE3 + {SPR_SMOK, FF_TRANS30|3, 30, {NULL}, 0, 0, S_FZSLOWSMOKE5}, // S_FZSLOWSMOKE4 + {SPR_SMOK, FF_TRANS30|4, 30, {NULL}, 0, 0, S_NULL}, // S_FZSLOWSMOKE5 #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK @@ -17211,6 +17236,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_FZEROBOOM + -1, // doomednum + S_INVISIBLE, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_kc31, // seesound + 8, // reactiontime + sfx_kc51, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + FRACUNIT, // radius + FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_DONTENCOREMAP, // flags + S_NULL // raisestate + }, + // ============================================================================================================================// #ifdef SEENAMES diff --git a/src/info.h b/src/info.h index f14d2121..5ac86689 100644 --- a/src/info.h +++ b/src/info.h @@ -169,6 +169,8 @@ void A_JawzExplode(); // SRB2kart void A_MineExplode(); // SRB2kart void A_BallhogExplode(); // SRB2kart void A_LightningFollowPlayer(); // SRB2kart: Lightning shield effect player chasing +void A_FZBoomFlash(); // SRB2kart +void A_FZBoomSmoke(); // SRB2kart void A_OrbitNights(); void A_GhostMe(); void A_SetObjectState(); @@ -653,6 +655,10 @@ typedef enum sprite SPR_LZI2, // ditto SPR_KLIT, // You have a twisted mind. But this actually is for the diagonal lightning. + SPR_FZSM, // F-Zero NO CONTEST explosion + SPR_FZBM, + SPR_FPRT, + SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw! SPR_FIRSTFREESLOT, @@ -3613,6 +3619,31 @@ typedef enum state S_KLIT11, S_KLIT12, + S_FZEROSMOKE1, // F-Zero NO CONTEST explosion + S_FZEROSMOKE2, + S_FZEROSMOKE3, + S_FZEROSMOKE4, + S_FZEROSMOKE5, + + S_FZEROBOOM1, + S_FZEROBOOM2, + S_FZEROBOOM3, + S_FZEROBOOM4, + S_FZEROBOOM5, + S_FZEROBOOM6, + S_FZEROBOOM7, + S_FZEROBOOM8, + S_FZEROBOOM9, + S_FZEROBOOM10, + S_FZEROBOOM11, + S_FZEROBOOM12, + + S_FZSLOWSMOKE1, + S_FZSLOWSMOKE2, + S_FZSLOWSMOKE3, + S_FZSLOWSMOKE4, + S_FZSLOWSMOKE5, + #ifdef SEENAMES S_NAMECHECK, #endif @@ -4283,6 +4314,8 @@ typedef enum mobj_type MT_KARMAHITBOX, MT_KARMAWHEEL, + MT_FZEROBOOM, + #ifdef SEENAMES MT_NAMECHECK, #endif diff --git a/src/k_kart.c b/src/k_kart.c index f13f1742..0d9e2322 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3977,6 +3977,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) //CONS_Printf("cam: %d, dest: %d\n", player->kartstuff[k_boostcam], player->kartstuff[k_destboostcam]); } + player->kartstuff[k_timeovercam] = 0; + if (player->kartstuff[k_spinouttimer]) { if ((P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1) diff --git a/src/p_enemy.c b/src/p_enemy.c index 37dd5899..fe23ca10 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -192,7 +192,9 @@ void A_JawzChase(mobj_t *actor); // SRB2kart void A_JawzExplode(mobj_t *actor); // SRB2kart void A_MineExplode(mobj_t *actor); // SRB2kart void A_BallhogExplode(mobj_t *actor); // SRB2kart -void A_LightningFollowPlayer(mobj_t *actor); // SRB2kart +void A_LightningFollowPlayer(mobj_t *actor); // SRB2kart +void A_FZBoomFlash(mobj_t *actor); // SRB2kart +void A_FZBoomSmoke(mobj_t *actor); // SRB2kart void A_OrbitNights(mobj_t *actor); void A_GhostMe(mobj_t *actor); void A_SetObjectState(mobj_t *actor); @@ -8173,7 +8175,7 @@ void A_ToggleFlameJet(mobj_t* actor) } } -//{ SRB2kart - A_ItemPop, A_JawzChase, A_JawzExplode, A_MineExplode, and A_BallhogExplode +//{ SRB2kart - A_ItemPop, A_JawzChase, A_JawzExplode, A_MineExplode, A_BallhogExplode, A_LightningFollowPlayer, A_FZBoomFlash, A_FZBoomSmoke void A_ItemPop(mobj_t *actor) { mobj_t *remains; @@ -8421,6 +8423,50 @@ void A_LightningFollowPlayer(mobj_t *actor) return; } +// A_FZBoomFlash: +// Flash everyone close enough to the boom +void A_FZBoomFlash(mobj_t *actor) +{ + UINT8 i; +#ifdef HAVE_BLUA + if (LUA_CallAction("A_FZBoomFlash", actor)) + return; +#endif + for (i = 0; i < MAXPLAYERS; i++) + { + fixed_t dist; + if (!playeringame[i] || !players[i].mo) + continue; + dist = P_AproxDistance(P_AproxDistance(actor->x-players[i].mo->x, actor->y-players[i].mo->y), actor->z-players[i].mo->z); + if (dist < 1536<x + (P_RandomRange(-rad, rad)*actor->scale), actor->y + (P_RandomRange(-rad, rad)*actor->scale), + actor->z + (P_RandomRange(0, 72)*actor->scale), MT_THOK); + + P_SetMobjState(smoke, S_FZEROSMOKE1); + smoke->tics += P_RandomRange(-3, 4); + smoke->scale = actor->scale*3; + } + return; +} + //} // Function: A_OrbitNights diff --git a/src/p_inter.c b/src/p_inter.c index 5e532c61..d200ca4b 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1951,7 +1951,7 @@ boolean P_CheckRacers(void) numplayersingame++; } - if (numplayersingame >= nospectategrief) // prevent spectate griefing + if (numplayersingame > 1 && nospectategrief > 0 && numplayersingame >= nospectategrief) // prevent spectate griefing { // check if we just got unlucky and there was only one guy who was a problem for (j = i+1; j < MAXPLAYERS; j++) @@ -2355,8 +2355,12 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source) break; case MT_PLAYER: - target->fuse = TICRATE*3; // timer before mobj disappears from view (even if not an actual player) target->momx = target->momy = target->momz = 0; + + if (target->player && target->player->pflags & PF_TIMEOVER) + break; + + target->fuse = TICRATE*3; // timer before mobj disappears from view (even if not an actual player) if (!(source && source->type == MT_NULL && source->threshold == 42)) // Don't jump up when drowning P_SetObjectMomZ(target, 14*FRACUNIT, false); @@ -2723,6 +2727,7 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage) // Get rid of shield player->powers[pw_shield] = SH_NONE; player->mo->color = player->skincolor; + player->mo->colorized = false; // Get rid of emeralds player->powers[pw_emeralds] = 0; @@ -2732,6 +2737,7 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage) P_ResetPlayer(player); P_SetPlayerMobjState(player->mo, player->mo->info->deathstate); + /*if (gametype == GT_CTF && (player->gotflag & (GF_REDFLAG|GF_BLUEFLAG))) { P_PlayerFlagBurst(player, false); @@ -2758,6 +2764,17 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage) HU_DoCEcho(va("%s\\is no longer super.\\\\\\\\", player_names[player-players])); }*/ + if (player->pflags & PF_TIMEOVER) + { + mobj_t *boom; + player->mo->flags |= (MF_NOGRAVITY|MF_NOCLIP); + player->mo->flags2 |= MF2_DONTDRAW; + boom = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_FZEROBOOM); + boom->scale = player->mo->scale; + boom->angle = player->mo->angle; + P_SetTarget(&boom->target, player->mo); + } + if (G_BattleGametype()) { if (player->kartstuff[k_bumper] > 0) diff --git a/src/p_mobj.c b/src/p_mobj.c index 84163f1c..288b5b6f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8481,6 +8481,66 @@ void P_MobjThinker(mobj_t *mobj) } } break; + case MT_FZEROBOOM: // F-Zero explosion + if (!mobj->extravalue1) + { + fixed_t mx = P_ReturnThrustX(NULL, mobj->angle, 32<angle, 32<x + (2*mx), mobj->y + (2*my), mobj->z+(mobj->height/2), MT_THOK); + + P_SetMobjState(explosion, S_FZEROBOOM1); + explosion->scale = mobj->scale*2; + explosion->momx = mx; + explosion->momy = my; + + S_StartSound(mobj, mobj->info->seesound); + mobj->extravalue1 = 1; + } + + if (!S_SoundPlaying(mobj, mobj->info->attacksound)) + S_StartSound(mobj, mobj->info->attacksound); + + if (mobj->extravalue2 > 70) // fire + smoke pillar + { + UINT8 i; + mobj_t *fire = P_SpawnMobj(mobj->x + (P_RandomRange(-32, 32)*mobj->scale), mobj->y + (P_RandomRange(-32, 32)*mobj->scale), mobj->z, MT_THOK); + + fire->sprite = SPR_FPRT; + fire->frame = FF_TRANS30; + fire->scale = mobj->scale*4; + fire->momz = P_RandomRange(2, 3)*mobj->scale; + fire->scalespeed = mobj->scale/12; + fire->destscale = 1; + fire->tics = TICRATE; + if (!mobj->target || (mobj->target && mobj->target->player && !P_IsLocalPlayer(mobj->target->player))) + fire->flags2 |= MF2_DONTDRAW; + + for (i = 0; i < 2; i++) + { + mobj_t *smoke = P_SpawnMobj(mobj->x + (P_RandomRange(-16, 16)*mobj->scale), mobj->y + (P_RandomRange(-16, 16)*mobj->scale), mobj->z, MT_SMOKE); + + P_SetMobjState(smoke, S_FZSLOWSMOKE1); + smoke->scale = mobj->scale; + smoke->momz = P_RandomRange(3, 10)*mobj->scale; + smoke->destscale = mobj->scale*4; + smoke->scalespeed = mobj->scale/24; + } + } + else + { + mobj->extravalue2++; // flametimer + + if (mobj->extravalue2 > 8) + { + mobj_t *smoke = P_SpawnMobj(mobj->x + (P_RandomRange(-31, 31)*mobj->scale), mobj->y + (P_RandomRange(-31, 31)*mobj->scale), + mobj->z + (P_RandomRange(0, 48)*mobj->scale), MT_THOK); + + P_SetMobjState(smoke, S_FZEROSMOKE1); + smoke->tics += P_RandomRange(-3, 4); + smoke->scale = mobj->scale*2; + } + } + break; //} case MT_TURRET: P_MobjCheckWater(mobj); diff --git a/src/p_user.c b/src/p_user.c index a6566cce..da82ae3c 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1181,7 +1181,7 @@ boolean P_EndingMusic(player_t *player) } if (G_RaceGametype() && bestlocalpos == MAXPLAYERS+1) - sprintf(buffer, "k*lose"); // krfail, for eventual F-Zero death results theme + sprintf(buffer, "k*fail"); // F-Zero death results theme else { if (bestlocalpos == 1) @@ -7883,25 +7883,22 @@ void P_FindEmerald(void) // static void P_DeathThink(player_t *player) { - //ticcmd_t *cmd = &player->cmd; - //player->deltaviewheight = 0; + if (player->pflags & PF_TIMEOVER) + { + player->kartstuff[k_timeovercam]++; + if (player->mo) + { + player->mo->flags |= (MF_NOGRAVITY|MF_NOCLIP); + player->mo->flags2 |= MF2_DONTDRAW; + } + } + else + player->kartstuff[k_timeovercam] = 0; if (player->deadtimer < INT32_MAX) player->deadtimer++; - // continue logic - /*if (!(netgame || multiplayer) && player->lives <= 0) - { - if (player->deadtimer > TICRATE && (cmd->buttons & BT_BRAKE || cmd->buttons & BT_ACCELERATE || cmd->buttons & BT_DRIFT) && player->continues > 0) - G_UseContinue(); - else if (player->deadtimer >= gameovertics) - G_UseContinue(); // Even if we don't have one this handles ending the game - }*/ - // Force respawn if idle for more than 30 seconds in shooter modes. - /*if (player->deadtimer > 30*TICRATE && !G_RaceGametype()) - player->playerstate = PST_REBORN; - else if (player->lives > 0 && !G_IsSpecialStage(gamemap)*/ if (player->lives > 0 /*&& leveltime >= starttime*/) // *could* you respawn? { // SRB2kart - spawn automatically after 1 second @@ -7910,55 +7907,6 @@ static void P_DeathThink(player_t *player) : TICRATE)) // don't let them change it in record attack player->playerstate = PST_REBORN; } - /*else if ((netgame || multiplayer) && player->deadtimer == 8*TICRATE) - { - // In a net/multiplayer game, and out of lives - if (gametype == GT_COMPETITION) - { - INT32 i; - - for (i = 0; i < MAXPLAYERS; i++) - if (playeringame[i] && !players[i].exiting && players[i].lives > 0) - break; - - if (i == MAXPLAYERS) - { - // Everyone's either done with the race, or dead. - if (!countdown2 || countdown2 > 1*TICRATE) - countdown2 = 1*TICRATE; - } - } - - // In a coop game, and out of lives - if (gametype == GT_COOP) - { - INT32 i; - - for (i = 0; i < MAXPLAYERS; i++) - if (playeringame[i] && (players[i].exiting || players[i].lives > 0)) - break; - - if (i == MAXPLAYERS) - { - // They're dead, Jim. - //nextmapoverride = spstage_start; - nextmapoverride = gamemap; - countdown2 = 1*TICRATE; - skipstats = true; - - for (i = 0; i < MAXPLAYERS; i++) - { - if (playeringame[i]) - players[i].score = 0; - } - - //emeralds = 0; - tokenbits = 0; - tokenlist = 0; - token = 0; - } - } - }*/ // Keep time rolling if (!(countdown2 && !countdown) && !(player->exiting || mapreset) && !(player->pflags & PF_TIMEOVER)) @@ -7982,50 +7930,6 @@ static void P_DeathThink(player_t *player) } } - /*if (G_RaceGametype() && (player->lives <= 0)) - { - // to the lose music! - if (player->deadtimer == 4*TICRATE) - P_EndingMusic(player); - // stuff below isn't for kart - // Return to level music - if (netgame) - { - if (player->deadtimer == gameovertics && P_IsLocalPlayer(player)) - S_ChangeMusic(mapmusname, mapmusflags, true); - } - else if (multiplayer) // local multiplayer only - { - if (player->deadtimer != gameovertics) - ; - // Restore the first available player's music once we're dead for long enough - // -- that is, as long as they aren't dead too - else - { - INT32 i; - - for (i = 0; i < 4; i++) - { - if (i > splitscreen) - break; - - if (i == 0 && player != &players[displayplayer] && players[displayplayer].lives > 0) - P_RestoreMusic(&players[displayplayer]); - else if (i == 1 && player != &players[secondarydisplayplayer] && players[secondarydisplayplayer].lives > 0) - P_RestoreMusic(&players[secondarydisplayplayer]); - else if (i == 2 && player != &players[thirddisplayplayer] && players[thirddisplayplayer].lives > 0) - P_RestoreMusic(&players[thirddisplayplayer]); - else if (i == 3 && player != &players[fourthdisplayplayer] && players[fourthdisplayplayer].lives > 0) - P_RestoreMusic(&players[fourthdisplayplayer]); - else - continue; - - break; - } - } - } - }*/ - if (!player->mo) return; @@ -8163,6 +8067,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall fixed_t pan, xpan, ypan; INT32 camrotate; boolean camstill, cameranoclip, lookback; + UINT8 timeover; mobj_t *mo; subsector_t *newsubsec; fixed_t f1, f2; @@ -8180,6 +8085,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall || (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)) // Noclipping player camera noclips too!! || (leveltime < introtime)); // Kart intro cam #endif + if (player->pflags & PF_TIMEOVER) // 1 for momentum keep, 2 for turnaround + timeover = (player->kartstuff[k_timeovercam] > 2*TICRATE ? 2 : 1); + else + timeover = 0; if (!(player->playerstate == PST_DEAD || player->exiting)) { @@ -8310,7 +8219,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall lookback = camspin4; } - if (leveltime < introtime) // Whoooshy camera! + if (timeover) + { + const INT32 timeovercam = min(180, (player->kartstuff[k_timeovercam] - 2*TICRATE)*15); + camrotate += timeovercam; + } + else if (leveltime < introtime) // Whoooshy camera! { const INT32 introcam = (introtime - leveltime); camrotate += introcam*5; @@ -8330,10 +8244,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (mo->eflags & MFE_VERTICALFLIP) camheight += thiscam->height; - if (camstill || resetcalled || player->playerstate == PST_DEAD) - angle = thiscam->angle; - else if (leveltime < starttime) + if (leveltime < starttime || timeover == 2) angle = focusangle + FixedAngle(camrotate*FRACUNIT); + else if (camstill || resetcalled || player->playerstate == PST_DEAD) + angle = thiscam->angle; else { angle_t input = focusangle + FixedAngle(camrotate<angle; @@ -8348,7 +8262,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall angle = thiscam->angle + input; } - if (!resetcalled && (leveltime > starttime) + if (!resetcalled && (leveltime > starttime && timeover != 2) && ((thiscam == &camera && t_cam_rotate != -42) || (thiscam == &camera2 && t_cam2_rotate != -42) || (thiscam == &camera3 && t_cam3_rotate != -42) @@ -8615,15 +8529,19 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + xpan; viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + ypan; - if (!camstill && !resetcalled && !paused) + if (timeover == 2) + thiscam->angle = angle; + else if (!camstill && !resetcalled && !paused && timeover != 1) thiscam->angle = R_PointToAngle2(thiscam->x, thiscam->y, viewpointx, viewpointy); - if (player->exiting) + if (timeover == 1) { - thiscam->momx = 0; - thiscam->momy = 0; + thiscam->momx = P_ReturnThrustX(NULL, thiscam->angle, 32<momy = P_ReturnThrustY(NULL, thiscam->angle, 32<momz = 0; } + else if (player->exiting || timeover == 2) + thiscam->momx = thiscam->momy = thiscam->momz = 0; else if (leveltime < starttime) { thiscam->momx = FixedMul(x - thiscam->x, camspeed); @@ -8649,10 +8567,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall else angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player)); - if (player->playerstate != PST_DEAD && !(player->pflags & PF_NIGHTSMODE && player->exiting)) + if (player->playerstate != PST_DEAD && !((player->pflags & PF_NIGHTSMODE) && player->exiting)) angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;' - if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still... + if (twodlevel || (mo->flags2 & MF2_TWOD) || (!camstill && !timeover)) // Keep the view still... { G_ClipAimingPitch((INT32 *)&angle); dist = thiscam->aiming - angle; @@ -8913,15 +8831,13 @@ void P_DoTimeOver(player_t *player) S_StopSound(player->mo); P_DamageMobj(player->mo, NULL, NULL, 10000); } + player->lives = 0; P_EndingMusic(player); -#if 0 - // sal, when you do the f-zero explosion, this is how you make sure the map doesn't end before it's done ^u^ ~toast if (!countdown2) countdown2 = 5*TICRATE; -#endif } // @@ -9419,6 +9335,7 @@ void P_PlayerThink(player_t *player) player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should. || player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either. || player->kartstuff[k_respawn] // Respawn timer (for drop dash effect) + || (player->pflags & PF_TIMEOVER) // NO CONTEST explosion || (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || leveltime < starttime)) // Level intro { diff --git a/src/sounds.c b/src/sounds.c index 02ad0853..53ec8c32 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -705,7 +705,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc2f", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring use {"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, - {"kc31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, + {"kc31", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR}, // NO CONTEST explosion {"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, @@ -737,7 +737,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, - {"kc51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, + {"kc51", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR}, // NO CONTEST debris ambience {"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, diff --git a/src/y_inter.c b/src/y_inter.c index 6a7e305c..c3c4b5dd 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -275,6 +275,8 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32)) for (j = 0; j < numplayersingame; j++) { + INT32 nump = ((G_RaceGametype() && nospectategrief > 0) ? nospectategrief : data.match.numplayers); + for (i = 0; i < MAXPLAYERS; i++) { if (!playeringame[i] || players[i].spectator || completed[i]) @@ -296,9 +298,9 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32)) else data.match.pos[data.match.numplayers] = data.match.numplayers+1; - if (!rankingsmode && !(players[i].pflags & PF_TIMEOVER) && (data.match.pos[data.match.numplayers] < nospectategrief)) + if (!rankingsmode && !(players[i].pflags & PF_TIMEOVER) && (data.match.pos[data.match.numplayers] < nump)) { - data.match.increase[i] = nospectategrief - data.match.pos[data.match.numplayers]; + data.match.increase[i] = nump - data.match.pos[data.match.numplayers]; players[i].score += data.match.increase[i]; } From 78ef057f81fa0096610d49cc062477cd2cdf8489 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 23 Oct 2018 19:06:26 -0400 Subject: [PATCH 18/33] Reset cam pan if dead/reset/still --- src/p_user.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index da82ae3c..e91c3b0a 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8298,25 +8298,30 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist); // SRB2Kart: set camera panning - if (player->kartstuff[k_drift] != 0) - { - fixed_t panmax = (dist/5); - pan = FixedDiv(FixedMul(min((fixed_t)player->kartstuff[k_driftcharge], K_GetKartDriftSparkValue(player)), panmax), K_GetKartDriftSparkValue(player)); - if (pan > panmax) - pan = panmax; - if (player->kartstuff[k_drift] < 0) - pan *= -1; - } - else + if (camstill || resetcalled || player->playerstate == PST_DEAD) pan = 0; + else + { + if (player->kartstuff[k_drift] != 0) + { + fixed_t panmax = (dist/5); + pan = FixedDiv(FixedMul(min((fixed_t)player->kartstuff[k_driftcharge], K_GetKartDriftSparkValue(player)), panmax), K_GetKartDriftSparkValue(player)); + if (pan > panmax) + pan = panmax; + if (player->kartstuff[k_drift] < 0) + pan *= -1; + } + else + pan = 0; - pan = thiscam->pan + FixedMul(pan - thiscam->pan, camspeed/4); + pan = thiscam->pan + FixedMul(pan - thiscam->pan, camspeed/4); - xpan = FixedMul(FINECOSINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan); - ypan = FixedMul(FINESINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan); + xpan = FixedMul(FINECOSINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan); + ypan = FixedMul(FINESINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan); - x += xpan; - y += ypan; + x += xpan; + y += ypan; + } pviewheight = FixedMul(32<scale); From 0fcb45a9af1724a67d3b35d8f0d81c3947449886 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 23 Oct 2018 19:08:13 -0400 Subject: [PATCH 19/33] reset these too --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index e91c3b0a..0763bca3 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8299,7 +8299,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall // SRB2Kart: set camera panning if (camstill || resetcalled || player->playerstate == PST_DEAD) - pan = 0; + pan = xpan = ypan = 0; else { if (player->kartstuff[k_drift] != 0) From 39bfad150f4ad4733320130066d1bcafae2d5ba9 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 23 Oct 2018 19:43:20 -0400 Subject: [PATCH 20/33] Fix camera movement when turning --- src/p_user.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 0763bca3..19accdba 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8221,7 +8221,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (timeover) { - const INT32 timeovercam = min(180, (player->kartstuff[k_timeovercam] - 2*TICRATE)*15); + const INT32 timeovercam = max(0, min(180, (player->kartstuff[k_timeovercam] - 2*TICRATE)*15)); camrotate += timeovercam; } else if (leveltime < introtime) // Whoooshy camera! @@ -8244,7 +8244,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (mo->eflags & MFE_VERTICALFLIP) camheight += thiscam->height; - if (leveltime < starttime || timeover == 2) + if (timeover) + angle = mo->angle + FixedAngle(camrotate*FRACUNIT); + else if (leveltime < starttime) angle = focusangle + FixedAngle(camrotate*FRACUNIT); else if (camstill || resetcalled || player->playerstate == PST_DEAD) angle = thiscam->angle; @@ -8534,15 +8536,15 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + xpan; viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + ypan; - if (timeover == 2) + if (timeover) thiscam->angle = angle; else if (!camstill && !resetcalled && !paused && timeover != 1) thiscam->angle = R_PointToAngle2(thiscam->x, thiscam->y, viewpointx, viewpointy); if (timeover == 1) { - thiscam->momx = P_ReturnThrustX(NULL, thiscam->angle, 32<momy = P_ReturnThrustY(NULL, thiscam->angle, 32<momx = P_ReturnThrustX(NULL, mo->angle, 32<momy = P_ReturnThrustY(NULL, mo->angle, 32<momz = 0; } else if (player->exiting || timeover == 2) From 9d7163675d56a452ca08ed5944d6932da167cca7 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 23 Oct 2018 19:45:35 -0400 Subject: [PATCH 21/33] Remove the local dontdraw Not only did I not implement this for everything, but I also REALLY like seeing other player's. If it's a problem, then let's just turn down the fuse and/or tics --- src/p_mobj.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 288b5b6f..42c46622 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8512,8 +8512,6 @@ void P_MobjThinker(mobj_t *mobj) fire->scalespeed = mobj->scale/12; fire->destscale = 1; fire->tics = TICRATE; - if (!mobj->target || (mobj->target && mobj->target->player && !P_IsLocalPlayer(mobj->target->player))) - fire->flags2 |= MF2_DONTDRAW; for (i = 0; i < 2; i++) { From 553013ddbf67a5ceccd823aaae3a675b5cff5e8e Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Wed, 24 Oct 2018 21:07:25 +0200 Subject: [PATCH 22/33] Reaper new anim + fast spawn for testing --- src/info.c | 2 +- src/p_enemy.c | 95 +++++++++++++++++++++++++++------------------------ 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/src/info.c b/src/info.c index ff15d0c2..10200f28 100644 --- a/src/info.c +++ b/src/info.c @@ -3085,7 +3085,7 @@ state_t states[NUMSTATES] = {SPR_MARR, 0, 1, {A_MayonakaArrow}, 0, 0, S_MAYONAKAARROW}, //S_MAYONAKAARROW //Mementos stuff - {SPR_NULL, 0, TICRATE*130, {NULL}, 0, 0, S_REAPER}, //S_REAPER_INVIS + {SPR_NULL, 0, TICRATE*20, {NULL}, 0, 0, S_REAPER}, //S_REAPER_INVIS TODO: DON'T FORGET TO CHANGE THAT BACK TO 130*TICRATE WHEN TESTING IS OVER {SPR_REAP, 0, 1, {A_ReaperThinker}, 0, 0, S_REAPER}, //S_REAPER {SPR_NULL, 0, 1, {A_MementosTPParticles}, 0, 0, S_MEMENTOSTP}, //S_MEMENTOSTP diff --git a/src/p_enemy.c b/src/p_enemy.c index 4a89423c..b756a4ee 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8438,7 +8438,7 @@ void A_RandomShadowFrame(mobj_t *actor) #endif if (!actor->extravalue1) // Hack that spawns thoks that look like random shadows. Otherwise the state would overwrite our frame and that's a pain. - { + { fake = P_SpawnMobj(actor->x, actor->y, actor->z, MT_THOK); fake->sprite = SPR_ENM1; fake->frame = P_RandomRange(0, 6); @@ -8450,9 +8450,9 @@ void A_RandomShadowFrame(mobj_t *actor) actor->flags2 |= MF2_DONTDRAW; actor->extravalue1 = 1; } - + P_SetScale(actor, FRACUNIT*3/2); - + // I have NO CLUE how to hardcode all of that fancy Linedef Executor shit so the fire spinout will be done by these entities directly. if (P_LookForPlayers(actor, false, false, 512<extravalue2) { @@ -8499,7 +8499,7 @@ void A_RoamingShadowThinker(mobj_t *actor) actor->extravalue2 = 60; } // Search for and attack Players venturing too close in front of us. - + if (P_LookForPlayers(actor, false, false, 256<target && !actor->target->player->powers[pw_flashing] @@ -8545,7 +8545,7 @@ void A_MayonakaArrow(mobj_t *actor) // "animtimer" is replaced by "extravalue1" here. actor->extravalue1 = ((actor->extravalue1) ? (actor->extravalue1+1) : (P_RandomRange(0, TICRATE*3))); flip = ((actor->spawnpoint->options & 1) ? (3) : (0)); // flip adds 3 frames, which is the flipped version of the sign. - + actor->frame = flip; if (actor->extravalue1 >= TICRATE*7/2) actor->extravalue1 = 0; // reset to 0 and start a new cycle. @@ -8553,10 +8553,10 @@ void A_MayonakaArrow(mobj_t *actor) actor->frame = flip+2; else if (actor->extravalue1 > TICRATE*3 && leveltime%2 > 0) actor->frame = flip+1; - + actor->frame |= FF_PAPERSPRITE; actor->momz = 0; - return; + return; } // A_MementosTPParticles @@ -8568,21 +8568,21 @@ void A_MementosTPParticles(mobj_t *actor) mobj_t *mo2; int i = 0; thinker_t *th; - + #ifdef HAVE_BLUA if (LUA_CallAction("A_MementosTPParticles", (actor))) return; #endif for (; i<4; i++) - { + { particle = P_SpawnMobj(actor->x + (P_RandomRange(-256, 256)<y + (P_RandomRange(-256, 256)<z + (P_RandomRange(48, 256)<frame = 0; particle->color = ((i%2) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK)); particle->destscale = 1; P_HomingAttack(particle, actor); } - + // Although this is mostly used to spawn particles, we will also save the OTHER teleport inside actor->target. That way teleporting doesn't require a thinker iteration. // Doesn't seem like much given the small amount of mobjs this map has but heh. if (!actor->target) @@ -8610,75 +8610,80 @@ void A_ReaperThinker(mobj_t *actor) mobj_t *particle; // particles to spawn int i = 0; // for loops angle_t an = ANGLE_22h; // Reminder that angle constants suck. - + //Waypoint stuff: mobj_t *mo2; thinker_t *th; - + //Player targetting stuff: INT32 maxscore = 0; // we target the player with the highest score so yeah there you go. player_t *player; // used as a shortcut in a loop. mobj_t *targetplayermo; // the player mo we can eventually target, or whatever. - - + + #ifdef HAVE_BLUA if (LUA_CallAction("A_ReaperThinker", (actor))) return; #endif - + // We don't have custom variables or whatever so we'll do with whatever the fuck we have left. - + if (actor->health == 1000) // if health is 1000, set it to a small scale and have it start growing with destscale. Then set the health to uh, not 1000. - { + { actor->scale = 1; actor->destscale = 2<scalespeed = FRACUNIT/24; // Should take a bit less than 2 seconds to fully grow. S_StartSound(NULL, sfx_chain); actor->health--; // now we have 999 health, so that above won't happen again. Awesome. } - + if (actor->scale < 2<x + (P_RandomRange(-60, 60)<y + (P_RandomRange(-60, 60)<z, MT_THOK); particle->momz = 20<color = ((i%2 !=0) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK)); particle->frame = 0; P_SetScale(particle, FRACUNIT/2); } - + // Spawn particles in some edgy circle or w/e. - + if (leveltime%5 != 0) // spawn the thing under that every tic. return; - + i=0; for (; i<15; i++) // spawn in a circle formation or w/e. - { + { particle = P_SpawnMobj(actor->x, actor->y, actor->z, MT_THOK); particle->momz = 20<color = ((i%2 !=0) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK)); particle->frame = 0; P_SetScale(particle, FRACUNIT/2); - P_InstaThrust(particle, an*i, 30<flags = MF_NOGRAVITY|MF_PAIN|MF_SPECIAL|MF_NOCLIP|MF_NOCLIPHEIGHT; // set our flags to be a damaging thing. - + // Handle animation: + if (!(leveltime%5)) + actor->extravalue2 = (actor->extravalue2 < 9) ? (actor->extravalue2+1) : (0); // Ghetto animation, but hey it works for what it's worth + + actor->frame = actor->extravalue2; // yes i'm that bad at maths don't @ me. + if (!actor->target) { if (actor->hnext) - { + { P_SetTarget(&actor->target, actor->hnext); // Default back to last waypoint. return; - } - + } + // We have no target and oughta find one, so let's scan through thinkers for a waypoint of angle 0, or something. for (th = thinkercap.next; th != &thinkercap; th = th->next) { @@ -8701,28 +8706,28 @@ void A_ReaperThinker(mobj_t *actor) break; } } - } + } else // Awesome, we now have a target. - { + { // Follow target: P_InstaThrust(actor, R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y), 20<angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y); - + // The player we should target if it's near us: for (i=0; ilastlook]; if (player && player->mo && player->kartstuff[k_bumper] && player->score >= maxscore) - { + { targetplayermo = player->mo; maxscore = player->score; } } - + // Try to target that player: if (targetplayermo) { @@ -8734,17 +8739,17 @@ void A_ReaperThinker(mobj_t *actor) && !actor->target->player->kartstuff[k_spinouttimer])) P_SetTarget(&actor->target, actor->hnext); // if the above isn't correct, then we should go back to targetting waypoints or something. - } + } } - + // Waypoint behavior. if (actor->target->type == MT_REAPERWAYPOINT) - { - + { + if (R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) < 22<target, NULL); // remove target so we can default back to first waypoint if things go ham. - + // If we reach close to a waypoint, then we should go to the NEXT one. for (th = thinkercap.next; th != &thinkercap; th = th->next) { @@ -8757,15 +8762,15 @@ void A_ReaperThinker(mobj_t *actor) continue; if (mo2->spawnpoint->angle != actor->extravalue1+1) continue; - + P_SetTarget(&actor->target, mo2); // The main target we're pursing. P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range! actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on. break; } } - - + + if (!actor->target) // If we have no target, revert back to waypoint 0. { actor->extravalue1 = 0; From 0874e6bb8edb9ee29defe48b30a8e7ddc98f6927 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Wed, 24 Oct 2018 22:28:44 +0200 Subject: [PATCH 23/33] Reaper will repeat chain sound + 1 small targetting bugfix --- src/p_enemy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index b756a4ee..0de402ad 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8674,6 +8674,10 @@ void A_ReaperThinker(mobj_t *actor) if (!(leveltime%5)) actor->extravalue2 = (actor->extravalue2 < 9) ? (actor->extravalue2+1) : (0); // Ghetto animation, but hey it works for what it's worth + // Chain sfx + if (!S_SoundPlaying(actor, sfx_chain)) + S_StartSound(actor, sfx_chain); + actor->frame = actor->extravalue2; // yes i'm that bad at maths don't @ me. if (!actor->target) @@ -8720,7 +8724,7 @@ void A_ReaperThinker(mobj_t *actor) if (!playeringame[i]) continue; - player = &players[actor->lastlook]; + player = &players[i]; if (player && player->mo && player->kartstuff[k_bumper] && player->score >= maxscore) { targetplayermo = player->mo; From 77fd7704e81843853b1eab74f34ed40c7fd5e86a Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Wed, 24 Oct 2018 23:55:12 +0200 Subject: [PATCH 24/33] Midnight Channel: HUD static effect hardcode --- src/dehacked.c | 2 +- src/doomstat.h | 2 +- src/st_stuff.c | 24 +++++++++++++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index f541750b..683297b0 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -990,7 +990,7 @@ static const struct { {"2D",TOL_2D}, {"MARIO",TOL_MARIO}, {"NIGHTS",TOL_NIGHTS}, - //{"OLDBRAK",TOL_ERZ3}, + {"TV",TOL_TV}, {"XMAS",TOL_XMAS}, {"CHRISTMAS",TOL_XMAS}, diff --git a/src/doomstat.h b/src/doomstat.h index 48ff5f9d..b12ebe92 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -302,7 +302,7 @@ enum TypeOfLevel TOL_2D = 0x0100, ///< 2D TOL_MARIO = 0x0200, ///< Mario TOL_NIGHTS = 0x0400, ///< NiGHTS - //TOL_ERZ3 = 0x0800, ///< ERZ3 + TOL_TV = 0x0800, ///< Midnight Channel specific: draw TV like overlay on HUD TOL_XMAS = 0x1000 ///< Christmas NiGHTS //TOL_KART = 0x4000 ///< Kart 32768 }; diff --git a/src/st_stuff.c b/src/st_stuff.c index e86e28a4..87009f54 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -124,6 +124,10 @@ static patch_t *minicaps; static patch_t *gotrflag; static patch_t *gotbflag; +// Midnight Channel: +static patch_t *hud_tv1; +static patch_t *hud_tv2; + // SRB2kart // @@ -345,6 +349,10 @@ void ST_LoadGraphics(void) ngradeletters[i] = W_CachePatchName(va("GRADE%d", i), PU_HUDGFX); K_LoadKartHUDGraphics(); + + // Midnight Channel: + hud_tv1 = W_CachePatchName("HUD_TV1", PU_HUDGFX); + hud_tv2 = W_CachePatchName("HUD_TV2", PU_HUDGFX); } // made separate so that skins code can reload custom face graphics @@ -1985,6 +1993,17 @@ static void ST_overlayDrawer(void) ST_drawDebugInfo(); } +// MayonakaStatic: draw Midnight Channel's TV-like borders +static void ST_MayonakaStatic(void) +{ + INT32 flag = (leveltime%2) ? V_90TRANS : V_70TRANS; + + V_DrawFixedPatch(0, 0, FRACUNIT, V_SNAPTOTOP|V_SNAPTOLEFT|flag, hud_tv1, NULL); + V_DrawFixedPatch(320<typeoflevel & TOL_TV) // Very specific Midnight Channel stuff. + ST_MayonakaStatic(); } } From ac4a2f3d026d09715f080f364e4ec1239cb5f33c Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Wed, 24 Oct 2018 23:57:08 +0200 Subject: [PATCH 25/33] Reduced aggravating stationary Shadow range + fixed whitespace --- src/p_enemy.c | 2 +- src/st_stuff.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 0de402ad..d77fdd4a 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8454,7 +8454,7 @@ void A_RandomShadowFrame(mobj_t *actor) P_SetScale(actor, FRACUNIT*3/2); // I have NO CLUE how to hardcode all of that fancy Linedef Executor shit so the fire spinout will be done by these entities directly. - if (P_LookForPlayers(actor, false, false, 512<target && !actor->target->player->powers[pw_flashing] && !actor->target->player->kartstuff[k_invincibilitytimer] diff --git a/src/st_stuff.c b/src/st_stuff.c index 87009f54..5ba00015 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2043,7 +2043,7 @@ void ST_Drawer(void) // No deadview! stplyr = &players[displayplayer]; ST_overlayDrawer(); - + if (splitscreen) { stplyr = &players[secondarydisplayplayer]; From 7ab6cefb9971f2f183eb9f34305a0153555dfde8 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 24 Oct 2018 18:14:25 -0400 Subject: [PATCH 26/33] Remove these --- src/k_kart.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 45b5b0ef..df6d958e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2199,9 +2199,6 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 mobj->momy = FixedMul(FixedDiv(mobjy - y, dist), FixedDiv(dist, 6*FRACUNIT)); mobj->momz = FixedMul(FixedDiv(mobjz - z, dist), FixedDiv(dist, 6*FRACUNIT)); - mobj->flags |= MF_NOCLIPTHING; - mobj->flags &= ~MF_SPECIAL; - P_SetTarget(&mobj->target, source); } } From a24507b2eb83581124e3e53ec67b60d59144b9fb Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Thu, 25 Oct 2018 00:58:59 +0200 Subject: [PATCH 27/33] Midnight Channel: warning sign hardcode --- src/p_enemy.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index d77fdd4a..38e1e797 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8538,17 +8538,29 @@ void A_RoamingShadowThinker(mobj_t *actor) void A_MayonakaArrow(mobj_t *actor) { INT32 flip = 0; + INT32 iswarning; #ifdef HAVE_BLUA if (LUA_CallAction("A_MayonakaArrow", (actor))) return; -#endif - // "animtimer" is replaced by "extravalue1" here. - actor->extravalue1 = ((actor->extravalue1) ? (actor->extravalue1+1) : (P_RandomRange(0, TICRATE*3))); - flip = ((actor->spawnpoint->options & 1) ? (3) : (0)); // flip adds 3 frames, which is the flipped version of the sign. +#endif - actor->frame = flip; + iswarning = actor->spawnpoint->options & MTF_OBJECTSPECIAL; // is our object a warning sign? + // "animtimer" is replaced by "extravalue1" here. + actor->extravalue1 = ((actor->extravalue1) ? (actor->extravalue1+1) : (P_RandomRange(0, (iswarning) ? (TICRATE/2) : TICRATE*3))); + flip = ((actor->spawnpoint->options & 1) ? (3) : (0)); // flip adds 3 frames, which is the flipped version of the sign. + // special warning behavior: + if (iswarning) + flip = 6; + + actor->frame = flip + actor->extravalue2*3; + if (actor->extravalue1 >= TICRATE*7/2) + { actor->extravalue1 = 0; // reset to 0 and start a new cycle. + // special behavior for warning sign; swap from warning to sneaker & reverse + if (iswarning) + actor->extravalue2 = (actor->extravalue2) ? (0) : (1); + } else if (actor->extravalue1 > TICRATE*7/2 -4) actor->frame = flip+2; else if (actor->extravalue1 > TICRATE*3 && leveltime%2 > 0) From 474bebaad3584c1a56f60ef9332bb43efc21032d Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Thu, 25 Oct 2018 00:59:43 +0200 Subject: [PATCH 28/33] I'm an idiot and keep forgetting to hit trim trailing space. --- src/p_enemy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 38e1e797..81a59130 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8542,7 +8542,7 @@ void A_MayonakaArrow(mobj_t *actor) #ifdef HAVE_BLUA if (LUA_CallAction("A_MayonakaArrow", (actor))) return; -#endif +#endif iswarning = actor->spawnpoint->options & MTF_OBJECTSPECIAL; // is our object a warning sign? // "animtimer" is replaced by "extravalue1" here. @@ -8553,14 +8553,14 @@ void A_MayonakaArrow(mobj_t *actor) flip = 6; actor->frame = flip + actor->extravalue2*3; - + if (actor->extravalue1 >= TICRATE*7/2) - { + { actor->extravalue1 = 0; // reset to 0 and start a new cycle. // special behavior for warning sign; swap from warning to sneaker & reverse if (iswarning) actor->extravalue2 = (actor->extravalue2) ? (0) : (1); - } + } else if (actor->extravalue1 > TICRATE*7/2 -4) actor->frame = flip+2; else if (actor->extravalue1 > TICRATE*3 && leveltime%2 > 0) From f3a61b43d786704521c1da1fd826ca0a9b87a9c2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 24 Oct 2018 19:38:46 -0400 Subject: [PATCH 29/33] Wrong variable --- src/y_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/y_inter.c b/src/y_inter.c index c3c4b5dd..9361dbe3 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -275,7 +275,7 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32)) for (j = 0; j < numplayersingame; j++) { - INT32 nump = ((G_RaceGametype() && nospectategrief > 0) ? nospectategrief : data.match.numplayers); + INT32 nump = ((G_RaceGametype() && nospectategrief > 0) ? nospectategrief : numplayersingame); for (i = 0; i < MAXPLAYERS; i++) { From 326955dd30a9f61b0c489356faac39a31cfd0296 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 24 Oct 2018 21:05:02 -0400 Subject: [PATCH 30/33] Turn cam on wall hit --- src/p_map.c | 5 +++++ src/p_mobj.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/p_map.c b/src/p_map.c index 468a5c67..4aed4db6 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2381,6 +2381,11 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam) || (thiscam == &camera3 && (players[thirddisplayplayer].pflags & PF_NOCLIP)) || (thiscam == &camera4 && (players[fourthdisplayplayer].pflags & PF_NOCLIP)) || (leveltime < introtime)) +#else + if ((thiscam == &camera && !(players[displayplayer].pflags & PF_TIMEOVER)) + || (thiscam == &camera2 && !(players[secondarydisplayplayer].pflags & PF_TIMEOVER)) + || (thiscam == &camera3 && !(players[thirddisplayplayer].pflags & PF_TIMEOVER)) + || (thiscam == &camera4 && !(players[fourthdisplayplayer].pflags & PF_TIMEOVER))) #endif { // Noclipping player camera noclips too!! floatok = true; diff --git a/src/p_mobj.c b/src/p_mobj.c index 42c46622..2f91d312 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3709,6 +3709,8 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled dummy.y = thiscam->y; dummy.z = thiscam->z; dummy.height = thiscam->height; + if (player->pflags & PF_TIMEOVER) + player->kartstuff[k_timeovercam] = 2*TICRATE; if (!resetcalled && !(player->pflags & PF_NOCLIP || leveltime < introtime) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead. P_ResetCamera(player, thiscam); else From 224408210cc2cdbbbd0492b77a2cdee0db1b20d7 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 24 Oct 2018 21:18:15 -0400 Subject: [PATCH 31/33] Extra safety The turn action happens on (k_timeovercam > 2*TICRATE). This ensures it happens immediately, although it was probably fine as is --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 2f91d312..0578dc39 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3710,7 +3710,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled dummy.z = thiscam->z; dummy.height = thiscam->height; if (player->pflags & PF_TIMEOVER) - player->kartstuff[k_timeovercam] = 2*TICRATE; + player->kartstuff[k_timeovercam] = (2*TICRATE)+1; if (!resetcalled && !(player->pflags & PF_NOCLIP || leveltime < introtime) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead. P_ResetCamera(player, thiscam); else From 974f6d47e114dd8c99ad1127508cb2e163baac83 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 24 Oct 2018 21:25:22 -0400 Subject: [PATCH 32/33] Fullbright explosion and fire --- src/info.c | 12 ++++++------ src/p_mobj.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/info.c b/src/info.c index 4507c558..6530eab0 100644 --- a/src/info.c +++ b/src/info.c @@ -3102,12 +3102,12 @@ state_t states[NUMSTATES] = {SPR_FZSM, 3, 4, {NULL}, 0, 0, S_FZEROSMOKE5}, // S_FZEROSMOKE4 {SPR_FZSM, 4, 4, {NULL}, 0, 0, S_NULL}, // S_FZEROSMOKE5 - {SPR_FZBM, 0, 2, {NULL}, 0, 0, S_FZEROBOOM2}, // S_FZEROBOOM1 - {SPR_FZBM, 1, 2, {NULL}, 0, 0, S_FZEROBOOM3}, // S_FZEROBOOM2 - {SPR_FZBM, 2, 2, {NULL}, 0, 0, S_FZEROBOOM4}, // S_FZEROBOOM3 - {SPR_FZBM, 3, 2, {A_FZBoomFlash}, 0, 0, S_FZEROBOOM5}, // S_FZEROBOOM4 - {SPR_FZBM, 2, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM6}, // S_FZEROBOOM5 - {SPR_FZBM, 1, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM7}, // S_FZEROBOOM6 + {SPR_FZBM, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_FZEROBOOM2}, // S_FZEROBOOM1 + {SPR_FZBM, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_FZEROBOOM3}, // S_FZEROBOOM2 + {SPR_FZBM, FF_FULLBRIGHT|2, 2, {NULL}, 0, 0, S_FZEROBOOM4}, // S_FZEROBOOM3 + {SPR_FZBM, FF_FULLBRIGHT|3, 2, {A_FZBoomFlash}, 0, 0, S_FZEROBOOM5}, // S_FZEROBOOM4 + {SPR_FZBM, FF_FULLBRIGHT|2, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM6}, // S_FZEROBOOM5 + {SPR_FZBM, FF_FULLBRIGHT|1, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM7}, // S_FZEROBOOM6 {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM8}, // S_FZEROBOOM7 {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 2, 0, S_FZEROBOOM9}, // S_FZEROBOOM8 {SPR_NULL, 0, 1, {A_FZBoomSmoke}, 3, 0, S_FZEROBOOM10}, // S_FZEROBOOM9 diff --git a/src/p_mobj.c b/src/p_mobj.c index ed1c0ba7..da0af87b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8521,7 +8521,7 @@ void P_MobjThinker(mobj_t *mobj) mobj_t *fire = P_SpawnMobj(mobj->x + (P_RandomRange(-32, 32)*mobj->scale), mobj->y + (P_RandomRange(-32, 32)*mobj->scale), mobj->z, MT_THOK); fire->sprite = SPR_FPRT; - fire->frame = FF_TRANS30; + fire->frame = FF_FULLBRIGHT|FF_TRANS30; fire->scale = mobj->scale*4; fire->momz = P_RandomRange(2, 3)*mobj->scale; fire->scalespeed = mobj->scale/12; From aa00ca72e2cf528e4c3981a912c1b8e16d57f4d0 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 24 Oct 2018 21:51:43 -0400 Subject: [PATCH 33/33] Fix merges (Don't bother me hastily to merge something in again, please) --- src/info.c | 4 ++++ src/p_enemy.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index 3366e5df..4cf3d845 100644 --- a/src/info.c +++ b/src/info.c @@ -17648,6 +17648,10 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 16<