From cb233bd500660f5227f25e3ca7d5888b66830873 Mon Sep 17 00:00:00 2001 From: Radicalicious <77638573+Radicalicious@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:57:19 -0600 Subject: [PATCH] Reapply "Hardcode OLDK" This reverts commit 5d0e99a3e754b135dd5c17a743628cd6751e642b. --- src/hardware/hw_light.c | 1 + src/info.c | 34 ++++++++++++++++++++++++++++++++++ src/info.h | 8 ++++++++ src/p_mobj.c | 4 ++++ 4 files changed, 47 insertions(+) diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index 1d2772dc4..a390092d1 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -575,6 +575,7 @@ light_t *t_lspr[NUMSPRITES] = &lspr[BLUEBALL_L], // SPR_SBFL, &lspr[BLUEBALL_L], // SPR_SBSK, &lspr[NOLIGHT], // SPR_BATT, + &lspr[NOLIGHT], // SPR_OLDK, // Debris &lspr[RINGSPARK_L], // SPR_SPRK diff --git a/src/info.c b/src/info.c index 715fe5d53..2361de627 100644 --- a/src/info.c +++ b/src/info.c @@ -486,6 +486,7 @@ char sprnames[NUMSPRITES + 1][MAXSPRITENAME + 1] = "SBFL", "SBSK", "HBAT", + "OLDK", // Debris "SPRK", // Sparkle @@ -3936,6 +3937,11 @@ state_t states[NUMSTATES] = {SPR_HBAT, 3, 1, {NULL}, 0, 0, S_HANGSTER_RETURN1, 0}, // S_HANGSTER_RETURN2 {SPR_HBAT, 0, 15, {NULL}, 0, 0, S_HANGSTER_LOOK, 0}, // S_HANGSTER_RETURN3 + {SPR_OLDK, FF_ANIMATE, -1, {NULL}, 1, 16, S_NULL, 0}, // S_OLDK_STND + {SPR_OLDK, 2, 0, {A_ForceWin}, 0, 0, S_OLDK_DIE1, 0}, // S_OLDK_DIE0 + {SPR_OLDK, 2, 0, {A_Scream}, 0, 0, S_OLDK_DIE2, 0}, // S_OLDK_DIE1 + {SPR_OLDK, 2, -1, {A_ZThrust}, 14, 1|(1<<16), S_NULL, 0}, // S_OLDK_DIE2 + {SPR_NULL, 0, 35, {NULL}, 0, 0, S_CRUMBLE2, 0}, // S_CRUMBLE1 {SPR_NULL, 0, 105, {A_Scream}, 0, 0, S_NULL, 0}, // S_CRUMBLE2 @@ -20496,6 +20502,34 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + // MT_OLDK + { + 666, // doomednum + S_OLDK_STND, // spawnstate + 2, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 32, // reactiontime + sfx_None, // attacksound + S_OLDK_DIE0, // painstate + 128, // painchance + sfx_s3k35, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_OLDK_DIE0, // deathstate + S_NULL, // xdeathstate + sfx_s3k35, // deathsound + 2*FRACUNIT, // speed + 32*FRACUNIT, // radius + 64*FRACUNIT, // height + 0, // display offset + 1000, // mass + 0, // damage + sfx_None, // activesound + MF_SPECIAL|MF_SHOOTABLE|MF_NOGRAVITY|MF_BOSS, // flags + S_NULL // raisestate + }, + { // MT_TELEPORTMAN 751, // doomednum S_INVISIBLE, // spawnstate diff --git a/src/info.h b/src/info.h index ddbfc31b7..37babf44b 100644 --- a/src/info.h +++ b/src/info.h @@ -1037,6 +1037,7 @@ typedef enum sprite SPR_SBFL, SPR_SBSK, SPR_HBAT, + SPR_OLDK, // Debris SPR_SPRK, // Sparkle @@ -4308,6 +4309,11 @@ typedef enum state S_HANGSTER_RETURN2, S_HANGSTER_RETURN3, + S_OLDK_STND, + S_OLDK_DIE0, + S_OLDK_DIE1, + S_OLDK_DIE2, + S_CRUMBLE1, S_CRUMBLE2, @@ -5116,6 +5122,8 @@ typedef enum mobj_type MT_SPINBOBERT_FIRE2, MT_HANGSTER, + MT_OLDK, + // Utility Objects MT_TELEPORTMAN, MT_ALTVIEWMAN, diff --git a/src/p_mobj.c b/src/p_mobj.c index fb9e7d78e..b02c4be49 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9529,6 +9529,10 @@ static boolean P_MobjRegularThink(mobj_t *mobj) if (!P_HangsterThink(mobj)) return false; break; + case MT_OLDK: + if (mobj->health <= 0) + mobj->momz -= ((2*FRACUNIT)/3); + break; case MT_LHRT: mobj->momx = FixedMul(mobj->momx, mobj->extravalue2); mobj->momy = FixedMul(mobj->momy, mobj->extravalue2);