From 7c67d32c6b8a2ead11117daf94afbe322f18be13 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 00:51:36 -0400 Subject: [PATCH 01/13] Update deh_tables.c --- src/deh_tables.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index 5733d9b0e..df993fee8 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -361,8 +361,9 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_XDEATHSTATE", "S_RAISESTATE", - // Thok + // Thok effect and spin trail "S_THOK", + "S_THOKEFFECT", // Player "S_PLAY_STND", @@ -3490,7 +3491,8 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t "MT_NULL", "MT_UNKNOWN", - "MT_THOK", // Thok! mobj + "MT_THOK", // Spin trail mobj + "MT_THOKEFFECT", // Thok boom effect "MT_PLAYER", "MT_TAILSOVERLAY", // c: "MT_METALJETFUME", From a9a5d5fa026782197e878d8cd1e178d44eb4f696 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 00:53:29 -0400 Subject: [PATCH 02/13] Update info.h --- src/info.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/info.h b/src/info.h index 604922beb..34b56b2cc 100644 --- a/src/info.h +++ b/src/info.h @@ -567,7 +567,8 @@ typedef enum sprite SPR_NULL, // invisible object SPR_UNKN, - SPR_THOK, // Thok! mobj + SPR_THOK, // Spin trail mobj + SPR_THKE, // Thok boom effect SPR_PLAY, // Enemies @@ -1163,8 +1164,9 @@ typedef enum state S_XDEATHSTATE, S_RAISESTATE, - // Thok + // Thok boom effect and spin trail S_THOK, + S_THOKEFFECT, // Player S_PLAY_STND, @@ -4312,7 +4314,8 @@ typedef enum mobj_type MT_NULL, MT_UNKNOWN, - MT_THOK, // Thok! mobj + MT_THOK, // Spin trail mobj + MT_THOKEFFECT, // Thok boom effect MT_PLAYER, MT_TAILSOVERLAY, // c: MT_METALJETFUME, From 863dc6be38529326ab88580bf02a94a6482add46 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 00:55:14 -0400 Subject: [PATCH 03/13] Update info.c --- src/info.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index 29a79b1d6..351d1ea88 100644 --- a/src/info.c +++ b/src/info.c @@ -33,7 +33,8 @@ char sprnames[NUMSPRITES + 1][5] = "NULL", // invisible object "UNKN", - "THOK", // Thok! mobj + "THOK", // Spin trail mobj + "THKE", // Thok boom effect "PLAY", // Enemies @@ -697,8 +698,9 @@ state_t states[NUMSTATES] = {SPR_UNKN, FF_FULLBRIGHT, -1, {A_InfoState}, 5, 0, S_NULL}, // S_XDEATHSTATE {SPR_UNKN, FF_FULLBRIGHT, -1, {A_InfoState}, 6, 0, S_NULL}, // S_RAISESTATE - // Thok + // Spin trail and thok boom effect {SPR_THOK, FF_TRANS50, 8, {NULL}, 0, 0, S_NULL}, // S_THOK + {SPR_THKE, FF_TRANS50|FF_PAPERSPRITE, 8, {NULL}, 0, 0, S_NULL}, // S_THOKEFFECT // Player {SPR_PLAY, SPR2_STND|FF_ANIMATE, 105, {NULL}, 0, 7, S_PLAY_WAIT}, // S_PLAY_STND @@ -4011,6 +4013,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags S_NULL // raisestate }, + + { // MT_THOKEFFECT + -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 + 8, // speed + 32*FRACUNIT, // radius + 64*FRACUNIT, // height + 0, // display offset + 16, // mass + 0, // damage + sfx_None, // activesound + MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, { // MT_PLAYER -1, // doomednum From 87bcdb8643503f0ad765366223649517e1cbf7da Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 00:57:33 -0400 Subject: [PATCH 04/13] Update p_user.c --- src/p_user.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index c5f919c78..f920ba4a6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2075,7 +2075,19 @@ void P_SpawnThokMobj(player_t *player) if (type == MT_GHOST) mobj = P_SpawnGhostMobj(player->mo); // virtually does everything here for us - else + else if (type == MT_THOKEFFECT) // Thok boom effect for Sonic + { + mobj = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->scale * 24, type); + mobj->angle = player->mo->angle + ANGLE_90; + mobj->fuse = 7; + mobj->scale = FRACUNIT / 3; + mobj->destscale = 10*FRACUNIT; + mobj->colorized = true; + mobj->color = player->mo->color; + mobj->momx = -player->mo->momx / 2; + mobj->momy = -player->mo->momy / 2; + } + else // Normal thok object handling { if (player->mo->eflags & MFE_VERTICALFLIP) zheight = player->mo->z + player->mo->height + FixedDiv(P_GetPlayerHeight(player) - player->mo->height, 3*FRACUNIT) - FixedMul(mobjinfo[type].height, player->mo->scale); From 1160b97a41fd535c0d74918caff0f8a33cebaafc Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 01:08:41 -0400 Subject: [PATCH 05/13] Hopefully fix ghosts without fucking my next branch --- src/g_demo.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/g_demo.c b/src/g_demo.c index 9d3b86015..9f955f13b 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -784,6 +784,19 @@ void G_GhostTicker(void) mobj = P_SpawnGhostMobj(g->mo); // does a large portion of the work for us mobj->frame = (mobj->frame & ~FF_FRAMEMASK)|tr_trans60<mo, 0, 0, g->mo->scale * 24, type); + mobj->angle = g->mo->angle + ANGLE_90; + mobj->fuse = 7; + mobj->scale = FRACUNIT / 3; + mobj->destscale = 10*FRACUNIT; + mobj->colorized = true; + mobj->color = g->mo->color; + mobj->momx = -g->mo->momx / 2; + mobj->momy = -g->mo->momy / 2; + } + else { mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, -FixedDiv(FixedMul(g->mo->info->height, g->mo->scale) - g->mo->height,3*FRACUNIT), MT_THOK); @@ -1074,6 +1087,18 @@ void G_ReadMetalTic(mobj_t *metal) { mobj = P_SpawnGhostMobj(metal); // does a large portion of the work for us } + else if (type == MT_THOKEFFECT) + { + mobj = P_SpawnMobjFromMobj(metal, 0, 0, metal->scale * 24, type); + mobj->angle = metal->angle + ANGLE_90; + mobj->fuse = 7; + mobj->scale = FRACUNIT / 3; + mobj->destscale = 10*FRACUNIT; + mobj->colorized = true; + mobj->color = metal->color; + mobj->momx = -metal->momx / 2; + mobj->momy = -metal->momy / 2; + } else { mobj = P_SpawnMobjFromMobj(metal, 0, 0, -FixedDiv(FixedMul(metal->info->height, metal->scale) - metal->height,3*FRACUNIT), MT_THOK); From 44bdfd8eafb466b710ed98dd4f71363798ce0395 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 02:40:44 -0400 Subject: [PATCH 06/13] Update hw_light.c --- src/hardware/hw_light.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index 987d70c69..71c450d5b 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -138,6 +138,7 @@ light_t *t_lspr[NUMSPRITES] = &lspr[NOLIGHT], // SPR_UNKN &lspr[NOLIGHT], // SPR_THOK + &lspr[NOLIGHT], // SPR_THKE &lspr[SUPERSONIC_L],// SPR_PLAY // Enemies From afb2a9b1dfd80685c1e903c7bd5a3ad742a90996 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 02:41:36 -0400 Subject: [PATCH 07/13] Update info.c --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index 351d1ea88..d8b07a9f5 100644 --- a/src/info.c +++ b/src/info.c @@ -4037,7 +4037,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 16, // mass 0, // damage sfx_None, // activesound - MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags S_NULL // raisestate }, From 3e2e1399a372ccec3d8ec24e64c28ef3cb15c389 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 02:49:07 -0400 Subject: [PATCH 08/13] Update g_demo.c --- src/g_demo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index 9f955f13b..962582493 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -786,11 +786,11 @@ void G_GhostTicker(void) } else if (type == MT_THOKEFFECT) { - mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, g->mo->scale * 24, type); + mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, FRACUNIT * 24, type); mobj->angle = g->mo->angle + ANGLE_90; mobj->fuse = 7; - mobj->scale = FRACUNIT / 3; - mobj->destscale = 10*FRACUNIT; + mobj->scale = g->mo->scale / 3; + mobj->destscale = 10 * g->mo->scale; mobj->colorized = true; mobj->color = g->mo->color; mobj->momx = -g->mo->momx / 2; @@ -1089,11 +1089,11 @@ void G_ReadMetalTic(mobj_t *metal) } else if (type == MT_THOKEFFECT) { - mobj = P_SpawnMobjFromMobj(metal, 0, 0, metal->scale * 24, type); + mobj = P_SpawnMobjFromMobj(metal, 0, 0, FRACUNIT * 24, type); mobj->angle = metal->angle + ANGLE_90; mobj->fuse = 7; - mobj->scale = FRACUNIT / 3; - mobj->destscale = 10*FRACUNIT; + mobj->scale = metal->scale / 3; + mobj->destscale = 10 * metal->scale; mobj->colorized = true; mobj->color = metal->color; mobj->momx = -metal->momx / 2; From bde1b08cbe647ed167306cae224f54a8fbd72b2f Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 02:50:08 -0400 Subject: [PATCH 09/13] Update p_user.c --- src/p_user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index f920ba4a6..83b95c3c8 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2077,11 +2077,11 @@ void P_SpawnThokMobj(player_t *player) mobj = P_SpawnGhostMobj(player->mo); // virtually does everything here for us else if (type == MT_THOKEFFECT) // Thok boom effect for Sonic { - mobj = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->scale * 24, type); + mobj = P_SpawnMobjFromMobj(player->mo, 0, 0, FRACUNIT * 24, type); mobj->angle = player->mo->angle + ANGLE_90; mobj->fuse = 7; - mobj->scale = FRACUNIT / 3; - mobj->destscale = 10*FRACUNIT; + mobj->scale = player->mo->scale / 3; + mobj->destscale = 10 * player->mo->scale; mobj->colorized = true; mobj->color = player->mo->color; mobj->momx = -player->mo->momx / 2; From 38be20af960aa6d421022e284c12ce56dd2fe314 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 11:28:50 -0400 Subject: [PATCH 10/13] Fix indentation --- src/g_demo.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index 962582493..89863f6c0 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -786,15 +786,15 @@ void G_GhostTicker(void) } else if (type == MT_THOKEFFECT) { - mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, FRACUNIT * 24, type); - mobj->angle = g->mo->angle + ANGLE_90; - mobj->fuse = 7; - mobj->scale = g->mo->scale / 3; - mobj->destscale = 10 * g->mo->scale; - mobj->colorized = true; - mobj->color = g->mo->color; - mobj->momx = -g->mo->momx / 2; - mobj->momy = -g->mo->momy / 2; + mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, FRACUNIT * 24, type); + mobj->angle = g->mo->angle + ANGLE_90; + mobj->fuse = 7; + mobj->scale = g->mo->scale / 3; + mobj->destscale = 10 * g->mo->scale; + mobj->colorized = true; + mobj->color = g->mo->color; + mobj->momx = -g->mo->momx / 2; + mobj->momy = -g->mo->momy / 2; } else @@ -1090,14 +1090,14 @@ void G_ReadMetalTic(mobj_t *metal) else if (type == MT_THOKEFFECT) { mobj = P_SpawnMobjFromMobj(metal, 0, 0, FRACUNIT * 24, type); - mobj->angle = metal->angle + ANGLE_90; - mobj->fuse = 7; - mobj->scale = metal->scale / 3; - mobj->destscale = 10 * metal->scale; - mobj->colorized = true; - mobj->color = metal->color; - mobj->momx = -metal->momx / 2; - mobj->momy = -metal->momy / 2; + mobj->angle = metal->angle + ANGLE_90; + mobj->fuse = 7; + mobj->scale = metal->scale / 3; + mobj->destscale = 10 * metal->scale; + mobj->colorized = true; + mobj->color = metal->color; + mobj->momx = -metal->momx / 2; + mobj->momy = -metal->momy / 2; } else { From a6ab670294d908db328a8508fb1f9d9e3d6aeb30 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Fri, 18 Jun 2021 11:29:43 -0400 Subject: [PATCH 11/13] Update info.c --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index d8b07a9f5..bc5e23055 100644 --- a/src/info.c +++ b/src/info.c @@ -4016,7 +4016,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = { // MT_THOKEFFECT -1, // doomednum - S_THOK, // spawnstate + S_THOKEFFECT, // spawnstate 1000, // spawnhealth S_NULL, // seestate sfx_None, // seesound From 4129140b4ac967e3fc1f8e03acfb044ec3d4443a Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Sun, 20 Jun 2021 21:01:40 -0400 Subject: [PATCH 12/13] Update p_user.c --- 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 83b95c3c8..9a68e6e9e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2077,7 +2077,7 @@ void P_SpawnThokMobj(player_t *player) mobj = P_SpawnGhostMobj(player->mo); // virtually does everything here for us else if (type == MT_THOKEFFECT) // Thok boom effect for Sonic { - mobj = P_SpawnMobjFromMobj(player->mo, 0, 0, FRACUNIT * 24, type); + mobj = P_SpawnMobjFromMobj(player->mo, 0, 0, FixedDiv(player->mo->height, player->mo->scale)*3/4, type); mobj->angle = player->mo->angle + ANGLE_90; mobj->fuse = 7; mobj->scale = player->mo->scale / 3; From e6fbd482adfb5452fd924eed0ab77c77b8e521b3 Mon Sep 17 00:00:00 2001 From: Radicalicious Date: Sun, 20 Jun 2021 21:02:32 -0400 Subject: [PATCH 13/13] Update g_demo.c --- src/g_demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index 89863f6c0..05d173dcf 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -786,7 +786,7 @@ void G_GhostTicker(void) } else if (type == MT_THOKEFFECT) { - mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, FRACUNIT * 24, type); + mobj = P_SpawnMobjFromMobj(g->mo, 0, 0, FixedDiv(g->mo->height, g->mo->scale)*3/4, type); mobj->angle = g->mo->angle + ANGLE_90; mobj->fuse = 7; mobj->scale = g->mo->scale / 3; @@ -1089,7 +1089,7 @@ void G_ReadMetalTic(mobj_t *metal) } else if (type == MT_THOKEFFECT) { - mobj = P_SpawnMobjFromMobj(metal, 0, 0, FRACUNIT * 24, type); + mobj = P_SpawnMobjFromMobj(metal, 0, 0, FixedDiv(metal->height, metal->scale)*3/4, type); mobj->angle = metal->angle + ANGLE_90; mobj->fuse = 7; mobj->scale = metal->scale / 3;