From aa947ea02203a087aa5389faccba9fbe040f10a6 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 13 Jul 2017 22:42:08 +0100 Subject: [PATCH] Starting work for hardcoding wall spikes --- src/dehacked.c | 11 +++++++++ src/info.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/info.h | 13 ++++++++++ 3 files changed, 89 insertions(+) diff --git a/src/dehacked.c b/src/dehacked.c index 189b9b269..c1d0d614d 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -4677,6 +4677,15 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_SPIKED1", "S_SPIKED2", + // Wall spikes + "S_WALLSPIKE1", + "S_WALLSPIKE2", + "S_WALLSPIKE3", + "S_WALLSPIKE4", + "S_WALLSPIKE5", + "S_WALLSPIKE6", + "S_WALLSPIKEBASE", + // Starpost "S_STARPOST_IDLE", "S_STARPOST_FLASH", @@ -6170,6 +6179,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_SPECIALSPIKEBALL", "MT_SPINFIRE", "MT_SPIKE", + "MT_WALLSPIKE", + "MT_WALLSPIKEBASE", "MT_STARPOST", "MT_BIGMINE", "MT_BIGAIRMINE", diff --git a/src/info.c b/src/info.c index c6e0c61b6..b48758689 100644 --- a/src/info.c +++ b/src/info.c @@ -131,6 +131,8 @@ char sprnames[NUMSPRITES + 1][5] = "SPIK", // Spike Ball "SFLM", // Spin fire "USPK", // Floor spike + "WSPK", // Wall spike + "WSPB", // Wall spike base "STPT", // Starpost "BMNE", // Big floating mine @@ -1574,6 +1576,15 @@ state_t states[NUMSTATES] = {SPR_USPK, 1,-1, {NULL}, 0, 0, S_NULL}, // S_SPIKED1 -- Busted spike particles {SPR_USPK, 2,-1, {NULL}, 0, 0, S_NULL}, // S_SPIKED2 + // Wall Spike + {SPR_WSPK, 0|FF_PAPERSPRITE,-1, {A_SpikeRetract}, 1, 0, S_WALLSPIKE2}, // S_WALLSPIKE1 -- Fully extended + {SPR_WSPK, 1|FF_PAPERSPRITE, 2, {A_Pain}, 0, 0, S_WALLSPIKE3}, // S_WALLSPIKE2 + {SPR_WSPK, 2|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_WALLSPIKE4}, // S_WALLSPIKE3 + {SPR_WSPK, 3|FF_PAPERSPRITE,-1, {A_SpikeRetract}, 0, 0, S_WALLSPIKE5}, // S_WALLSPIKE4 -- Fully retracted + {SPR_WSPK, 2|FF_PAPERSPRITE, 2, {A_Pain}, 0, 0, S_WALLSPIKE6}, // S_WALLSPIKE5 + {SPR_WSPK, 1|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_WALLSPIKE1}, // S_WALLSPIKE6 + {SPR_WSPB, 0|FF_PAPERSPRITE,-1, {NULL}, 0, 0, S_NULL}, // S_WALLSPIKEBASE -- Base + // Starpost {SPR_STPT, 0 , -1, {NULL}, 0, 0, S_NULL}, // S_STARPOST_IDLE {SPR_STPT, FF_ANIMATE|17, -1, {NULL}, 5, 1, S_NULL}, // S_STARPOST_FLASH @@ -6011,6 +6022,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_WALLSPIKE + 522, // doomednum + S_WALLSPIKE1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_s3k64, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 2*TICRATE, // speed + 32*FRACUNIT, // radius + 14*FRACUNIT, // height + 0, // display offset + 4, // mass + 0, // damage + sfx_None, // activesound + MF_SOLID|MF_NOGRAVITY|MF_PAPERCOLLISION, //MF_NOBLOCKMAP|MF_NOGRAVITY|MF_SCENERY|MF_NOCLIPHEIGHT, // flags + S_NULL // raisestate + }, + + { // MT_WALLSPIKEBASE + -1, // doomednum + S_WALLSPIKEBASE, // 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 + 7*FRACUNIT, // radius + 14*FRACUNIT, // height + 0, // display offset + 4, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPTHING, // flags + S_NULL // raisestate + }, + { // MT_STARPOST 502, // doomednum S_STARPOST_IDLE, // spawnstate diff --git a/src/info.h b/src/info.h index 6a2eb65c5..7a5b28ffc 100644 --- a/src/info.h +++ b/src/info.h @@ -337,6 +337,8 @@ typedef enum sprite SPR_SPIK, // Spike Ball SPR_SFLM, // Spin fire SPR_USPK, // Floor spike + SPR_WSPK, // Wall spike + SPR_WSPB, // Wall spike base SPR_STPT, // Starpost SPR_BMNE, // Big floating mine @@ -1779,6 +1781,15 @@ typedef enum state S_SPIKED1, S_SPIKED2, + // Wall spikes + S_WALLSPIKE1, + S_WALLSPIKE2, + S_WALLSPIKE3, + S_WALLSPIKE4, + S_WALLSPIKE5, + S_WALLSPIKE6, + S_WALLSPIKEBASE, + // Starpost S_STARPOST_IDLE, S_STARPOST_FLASH, @@ -3293,6 +3304,8 @@ typedef enum mobj_type MT_SPECIALSPIKEBALL, MT_SPINFIRE, MT_SPIKE, + MT_WALLSPIKE, + MT_WALLSPIKEBASE, MT_STARPOST, MT_BIGMINE, MT_BIGAIRMINE,