* Bumpers and Balloons in a more final state.

* Blue diagonal springs, because that gap is very, very odd.
* Improved A_SpawnFreshCopy.
* Tweaked P_LookForEnemies for consistency's sake. (Previously, it was impossible to make a spring that could neither be homing-attacked or attraction-shotted.)
This commit is contained in:
toasterbabe 2018-05-20 00:04:39 +01:00
parent 786fd65f3c
commit ee42132ed1
9 changed files with 385 additions and 157 deletions

View file

@ -1826,6 +1826,7 @@ static actionpointer_t actionpointers[] =
{{A_WhoCaresIfYourSonIsABee},"A_WHOCARESIFYOURSONISABEE"},
{{A_ParentTriesToSleep}, "A_PARENTTRIESTOSLEEP"},
{{A_CryingToMomma}, "A_CRYINGTOMOMMA"},
{{A_CheckFlags2}, "A_CHECKFLAGS2"},
{{NULL}, "NONE"},
@ -4420,12 +4421,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Emeralds (for hunt)
"S_EMER1",
"S_FAN",
"S_FAN2",
"S_FAN3",
"S_FAN4",
"S_FAN5",
// Bubble Source
"S_BUBBLES1",
"S_BUBBLES2",
@ -4487,16 +4482,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_SIGN52", // Eggman
"S_SIGN53",
// Steam Riser
"S_STEAM1",
"S_STEAM2",
"S_STEAM3",
"S_STEAM4",
"S_STEAM5",
"S_STEAM6",
"S_STEAM7",
"S_STEAM8",
// Spike Ball
"S_SPIKEBALL1",
"S_SPIKEBALL2",
@ -5503,19 +5488,51 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_SECRETFLICKY_02_FLAP2",
"S_SECRETFLICKY_02_FLAP3",
// Fan
"S_FAN",
"S_FAN2",
"S_FAN3",
"S_FAN4",
"S_FAN5",
// Steam Riser
"S_STEAM1",
"S_STEAM2",
"S_STEAM3",
"S_STEAM4",
"S_STEAM5",
"S_STEAM6",
"S_STEAM7",
"S_STEAM8",
// Bumpers
"S_BUMPER",
"S_BUMPERHIT",
// Balloons
"S_BALLOON",
"S_BALLOONPOP1",
"S_BALLOONPOP2",
"S_BALLOONPOP3",
"S_BALLOONPOP4",
"S_BALLOONPOP5",
"S_BALLOONPOP6",
// Yellow Spring
"S_YELLOWSPRING",
"S_YELLOWSPRING2",
"S_YELLOWSPRING3",
"S_YELLOWSPRING4",
"S_YELLOWSPRING5",
// Red Spring
"S_REDSPRING",
"S_REDSPRING2",
"S_REDSPRING3",
"S_REDSPRING4",
"S_REDSPRING5",
// Blue Springs
// Blue Spring
"S_BLUESPRING",
"S_BLUESPRING2",
"S_BLUESPRING3",
@ -5542,6 +5559,16 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_RDIAG7",
"S_RDIAG8",
// Blue Diagonal Spring
"S_BDIAG1",
"S_BDIAG2",
"S_BDIAG3",
"S_BDIAG4",
"S_BDIAG5",
"S_BDIAG6",
"S_BDIAG7",
"S_BDIAG8",
// Yellow Side Spring
"S_YHORIZ1",
"S_YHORIZ2",
@ -5661,6 +5688,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_SCRI", // 4000 (mario)
"S_SCRJ", // 8000 (mario)
"S_SCRK", // 1UP (mario)
"S_SCRL", // 10
// Drowning Timer Numbers
"S_ZERO1",
@ -6293,15 +6321,19 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
// Springs and others
"MT_FAN",
"MT_STEAM", // Steam riser
"MT_BLUESPRING",
"MT_STEAM",
"MT_BUMPER",
"MT_BALLOON",
"MT_YELLOWSPRING",
"MT_REDSPRING",
"MT_YELLOWDIAG", // Yellow Diagonal Spring
"MT_REDDIAG", // Red Diagonal Spring
"MT_YELLOWHORIZ", // Yellow Side Spring
"MT_REDHORIZ", // Red Side Spring
"MT_BLUEHORIZ", // Blue Side Spring
"MT_BLUESPRING",
"MT_YELLOWDIAG",
"MT_REDDIAG",
"MT_BLUEDIAG",
"MT_YELLOWHORIZ",
"MT_REDHORIZ",
"MT_BLUEHORIZ",
// Interactive Objects
"MT_BUBBLES", // Bubble source

View file

@ -234,10 +234,8 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_EMER
// Interactive Objects
&lspr[NOLIGHT], // SPR_FANS
&lspr[NOLIGHT], // SPR_BBLS
&lspr[NOLIGHT], // SPR_SIGN
&lspr[NOLIGHT], // SPR_STEM
&lspr[NOLIGHT], // SPR_SPIK
&lspr[NOLIGHT], // SPR_SFLM
&lspr[NOLIGHT], // SPR_USPK
@ -245,7 +243,6 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_WSPB
&lspr[NOLIGHT], // SPR_STPT
&lspr[NOLIGHT], // SPR_BMNE
&lspr[REDBALL_L], // SPR_BMNB
// Monitor Boxes
&lspr[NOLIGHT], // SPR_MSTV
@ -408,11 +405,16 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_FS02
// Springs
&lspr[NOLIGHT], // SPR_FANS
&lspr[NOLIGHT], // SPR_STEM
&lspr[NOLIGHT], // SPR_BUMP
&lspr[NOLIGHT], // SPR_BLON
&lspr[NOLIGHT], // SPR_SPRY
&lspr[NOLIGHT], // SPR_SPRR
&lspr[NOLIGHT], // SPR_SPRB
&lspr[NOLIGHT], // SPR_YSPR
&lspr[NOLIGHT], // SPR_RSPR
&lspr[NOLIGHT], // SPR_BSPR
&lspr[NOLIGHT], // SPR_SSWY
&lspr[NOLIGHT], // SPR_SSWR
&lspr[NOLIGHT], // SPR_SSWB
@ -506,6 +508,7 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[SUPERSPARK_L], // SPR_BOM2
&lspr[SUPERSPARK_L], // SPR_BOM3
&lspr[NOLIGHT], // SPR_BOM4
&lspr[REDBALL_L], // SPR_BMNB
// Crumbly rocks
&lspr[NOLIGHT], // SPR_ROIA

View file

@ -123,10 +123,8 @@ char sprnames[NUMSPRITES + 1][5] =
"EMER", // Emerald Hunt
// Interactive Objects
"FANS",
"BBLS", // water bubble source
"SIGN", // Level end sign
"STEM", // Steam riser
"SPIK", // Spike Ball
"SFLM", // Spin fire
"USPK", // Floor spike
@ -134,7 +132,6 @@ char sprnames[NUMSPRITES + 1][5] =
"WSPB", // Wall spike base
"STPT", // Starpost
"BMNE", // Big floating mine
"BMNB",
// Monitor Boxes
"MSTV", // MiSc TV sprites
@ -302,11 +299,16 @@ char sprnames[NUMSPRITES + 1][5] =
"FS02", // Bat
// Springs
"SPRY", // yellow spring
"SPRR", // red spring
"SPRB", // Blue springs
"FANS", // Fan
"STEM", // Steam riser
"BUMP", // Bumpers
"BLON", // Balloons
"SPRY", // Yellow spring
"SPRR", // Red spring
"SPRB", // Blue spring
"YSPR", // Yellow Diagonal Spring
"RSPR", // Red Diagonal Spring
"BSPR", // Blue Diagonal Spring
"SSWY", // Yellow Side Spring
"SSWR", // Red Side Spring
"SSWB", // Blue Side Spring
@ -395,11 +397,12 @@ char sprnames[NUMSPRITES + 1][5] =
"HBAT",
// Debris
"SPRK", // spark
"SPRK", // Sparkle
"BOM1", // Robot Explosion
"BOM2", // Boss Explosion 1
"BOM3", // Boss Explosion 2
"BOM4", // Underwater Explosion
"BMNB", // Mine Explosion
// Crumbly rocks
"ROIA",
@ -1639,13 +1642,6 @@ state_t states[NUMSTATES] =
// Emeralds (for hunt)
{SPR_EMER, 0, -1, {NULL}, 0, 0, S_NULL}, // S_EMER1
// Fan
{SPR_FANS, 0, 1, {A_FanBubbleSpawn}, 2048, 0, S_FAN2}, // S_FAN
{SPR_FANS, 1, 1, {A_FanBubbleSpawn}, 1024, 0, S_FAN3}, // S_FAN2
{SPR_FANS, 2, 1, {A_FanBubbleSpawn}, 512, 0, S_FAN4}, // S_FAN3
{SPR_FANS, 3, 1, {A_FanBubbleSpawn}, 1024, 0, S_FAN5}, // S_FAN4
{SPR_FANS, 4, 1, {A_FanBubbleSpawn}, 512, 0, S_FAN}, // S_FAN5
// Bubble Source
{SPR_BBLS, 0, 8, {A_BubbleSpawn}, 2048, 0, S_BUBBLES2}, // S_BUBBLES1
{SPR_BBLS, 1, 8, {A_BubbleCheck}, 0, 0, S_BUBBLES3}, // S_BUBBLES2
@ -1707,16 +1703,6 @@ state_t states[NUMSTATES] =
{SPR_SIGN, 3, -1, {NULL}, 0, 0, S_NULL}, // S_SIGN52 Eggman
{SPR_SIGN, 7, -1, {A_SignPlayer}, 0, 0, S_NULL}, // S_SIGN53 Blank
// Steam Riser
{SPR_STEM, 0, 2, {A_SetSolidSteam}, 0, 0, S_STEAM2}, // S_STEAM1
{SPR_STEM, 1, 2, {A_UnsetSolidSteam}, 0, 0, S_STEAM3}, // S_STEAM2
{SPR_STEM, 2, 2, {NULL}, 0, 0, S_STEAM4}, // S_STEAM3
{SPR_STEM, 3, 2, {NULL}, 0, 0, S_STEAM5}, // S_STEAM4
{SPR_STEM, 4, 2, {NULL}, 0, 0, S_STEAM6}, // S_STEAM5
{SPR_STEM, 5, 2, {NULL}, 0, 0, S_STEAM7}, // S_STEAM6
{SPR_STEM, 6, 2, {NULL}, 0, 0, S_STEAM8}, // S_STEAM7
{SPR_STEM, 7, 18, {NULL}, 0, 0, S_STEAM1}, // S_STEAM8
// Spike Ball
{SPR_SPIK, 0, 1, {A_RotateSpikeBall}, 0, 0, S_SPIKEBALL2}, // S_SPIKEBALL1
{SPR_SPIK, 1, 1, {A_RotateSpikeBall}, 0, 0, S_SPIKEBALL3}, // S_SPIKEBALL2
@ -2733,6 +2719,36 @@ state_t states[NUMSTATES] =
{SPR_FS02, 2, 3, {A_FlickyFly}, 4*FRACUNIT, 16*FRACUNIT, S_SECRETFLICKY_02_FLAP3}, // S_SECRETFLICKY_02_FLAP2
{SPR_FS02, 3, 3, {A_FlickyFly}, 4*FRACUNIT, 16*FRACUNIT, S_SECRETFLICKY_02_FLAP1}, // S_SECRETFLICKY_02_FLAP3
// Fan
{SPR_FANS, 0, 1, {A_FanBubbleSpawn}, 2048, 0, S_FAN2}, // S_FAN
{SPR_FANS, 1, 1, {A_FanBubbleSpawn}, 1024, 0, S_FAN3}, // S_FAN2
{SPR_FANS, 2, 1, {A_FanBubbleSpawn}, 512, 0, S_FAN4}, // S_FAN3
{SPR_FANS, 3, 1, {A_FanBubbleSpawn}, 1024, 0, S_FAN5}, // S_FAN4
{SPR_FANS, 4, 1, {A_FanBubbleSpawn}, 512, 0, S_FAN}, // S_FAN5
// Steam Riser
{SPR_STEM, 0, 2, {A_SetSolidSteam}, 0, 0, S_STEAM2}, // S_STEAM1
{SPR_STEM, 1, 2, {A_UnsetSolidSteam}, 0, 0, S_STEAM3}, // S_STEAM2
{SPR_STEM, 2, 2, {NULL}, 0, 0, S_STEAM4}, // S_STEAM3
{SPR_STEM, 3, 2, {NULL}, 0, 0, S_STEAM5}, // S_STEAM4
{SPR_STEM, 4, 2, {NULL}, 0, 0, S_STEAM6}, // S_STEAM5
{SPR_STEM, 5, 2, {NULL}, 0, 0, S_STEAM7}, // S_STEAM6
{SPR_STEM, 6, 2, {NULL}, 0, 0, S_STEAM8}, // S_STEAM7
{SPR_STEM, 7, 18, {NULL}, 0, 0, S_STEAM1}, // S_STEAM8
// Bumpers
{SPR_BUMP, FF_ANIMATE|FF_GLOBALANIM, -1, {NULL}, 3, 4, S_NULL}, // S_BUMPER
{SPR_BUMP, FF_ANIMATE|4, 12, {A_Pain}, 1, 3, S_BUMPER}, //S_BUMPERHIT
// Balloons
{SPR_BLON, FF_ANIMATE, -1, {NULL}, 2, 5, S_NULL}, // S_BALLOON
{SPR_BLON, 3, 0, {A_RemoteDamage}, 0, 1, S_BALLOONPOP2}, // S_BALLOONPOP1
{SPR_BLON, 3, 1, {A_Pain}, 0, 0, S_BALLOONPOP3}, // S_BALLOONPOP2
{SPR_BLON, 4, 1, {NULL}, 0, 0, S_BALLOONPOP4}, // S_BALLOONPOP3
{SPR_NULL, 0, TICRATE, {A_CheckFlags2}, MF2_AMBUSH, S_BALLOONPOP5, S_NULL}, // S_BALLOONPOP4
{SPR_NULL, 0, 15*TICRATE, {NULL}, 0, 0, S_BALLOONPOP6}, // S_BALLOONPOP5
{SPR_NULL, 0, 0, {A_SpawnFreshCopy}, 0, 0, S_NULL}, // S_BALLOONPOP6
// Yellow Spring
{SPR_SPRY, 0, -1, {NULL}, 0, 0, S_NULL}, // S_YELLOWSPRING
{SPR_SPRY, 4, 4, {A_Pain}, 0, 0, S_YELLOWSPRING3}, // S_YELLOWSPRING2
@ -2774,6 +2790,16 @@ state_t states[NUMSTATES] =
{SPR_RSPR, 2, 1, {NULL}, 0, 0, S_RDIAG8}, // S_RDIAG7
{SPR_RSPR, 1, 1, {NULL}, 0, 0, S_RDIAG1}, // S_RDIAG8
// Blue Diagonal Spring
{SPR_BSPR, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BDIAG1
{SPR_BSPR, 1, 1, {A_Pain}, 0, 0, S_BDIAG3}, // S_BDIAG2
{SPR_BSPR, 2, 1, {NULL}, 0, 0, S_BDIAG4}, // S_BDIAG3
{SPR_BSPR, 3, 1, {NULL}, 0, 0, S_BDIAG5}, // S_BDIAG4
{SPR_BSPR, 4, 1, {NULL}, 0, 0, S_BDIAG6}, // S_BDIAG5
{SPR_BSPR, 3, 1, {NULL}, 0, 0, S_BDIAG7}, // S_BDIAG6
{SPR_BSPR, 2, 1, {NULL}, 0, 0, S_BDIAG8}, // S_BDIAG7
{SPR_BSPR, 1, 1, {NULL}, 0, 0, S_BDIAG1}, // S_BDIAG8
// Yellow Side Spring
{SPR_SSWY, 0, -1, {NULL}, 0, 0, S_NULL}, // S_YHORIZ1
{SPR_SSWY, 1, 1, {A_Pain}, 0, 0, S_YHORIZ3}, // S_YHORIZ2
@ -2898,6 +2924,7 @@ state_t states[NUMSTATES] =
{SPR_SCOR, 8, 32, {A_ScoreRise}, 0, 0, S_NULL}, // S_SCRI - 4000 (mario mode)
{SPR_SCOR, 9, 32, {A_ScoreRise}, 0, 0, S_NULL}, // S_SCRJ - 8000 (mario mode)
{SPR_SCOR, 10, 32, {A_ScoreRise}, 0, 0, S_NULL}, // S_SCRK - 1UP (mario mode)
{SPR_SCOR, 11, 32, {A_ScoreRise}, 0, 0, S_NULL}, // S_SCRL - 10
// Drowning Timer Numbers
{SPR_DRWN, 0, 40, {NULL}, 0, 0, S_NULL}, // S_ZERO1
@ -6150,40 +6177,67 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_BLUESPRING
552, // doomednum
S_BLUESPRING, // spawnstate
{ // MT_BUMPER
542, // doomednum
S_BUMPER, // spawnstate
1000, // spawnhealth
S_BLUESPRING2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
5, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_spring, // painsound
-1, // painchance
sfx_s3kaa, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
20*FRACUNIT, // radius
16*FRACUNIT, // height
32*FRACUNIT, // radius
64*FRACUNIT, // height
0, // display offset
11*FRACUNIT, // mass
16*FRACUNIT, // mass
0, // damage
sfx_None, // activesound
MF_SPRING, // flags
S_BLUESPRING2 // raisestate
MF_SPRING|MF_NOGRAVITY, // flags
S_BUMPERHIT // raisestate
},
{ // MT_BALLOON
543, // doomednum
S_BALLOON, // spawnstate
1, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
2, // painchance
sfx_s3k77, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_BALLOONPOP2, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
32*FRACUNIT, // radius
64*FRACUNIT, // height
0, // display offset
20*FRACUNIT, // mass
0, // damage
sfx_None, // activesound
MF_SPRING|MF_NOGRAVITY, // flags
S_BALLOONPOP1 // raisestate
},
{ // MT_YELLOWSPRING
550, // doomednum
S_YELLOWSPRING, // spawnstate
1000, // spawnhealth
S_YELLOWSPRING2,// seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6208,9 +6262,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
551, // doomednum
S_REDSPRING, // spawnstate
1000, // spawnhealth
S_REDSPRING2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6231,13 +6285,40 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_REDSPRING2 // raisestate
},
{ // MT_BLUESPRING
552, // doomednum
S_BLUESPRING, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_spring, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
20*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
11*FRACUNIT, // mass
0, // damage
sfx_None, // activesound
MF_SPRING, // flags
S_BLUESPRING2 // raisestate
},
{ // MT_YELLOWDIAG
555, // doomednum
S_YDIAG1, // spawnstate
1, // spawnhealth
S_YDIAG2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6262,9 +6343,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
556, // doomednum
S_RDIAG1, // spawnstate
1, // spawnhealth
S_RDIAG2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6285,13 +6366,40 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_RDIAG2 // raisestate
},
{ // MT_BLUEDIAG
557, // doomednum
S_BDIAG1, // spawnstate
1, // spawnhealth
S_BDIAG2, // seestate
sfx_None, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_spring, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
16*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
11*FRACUNIT, // mass
11*FRACUNIT, // damage
sfx_None, // activesound
MF_SPRING, // flags
S_BDIAG2 // raisestate
},
{ // MT_YELLOWHORIZ
558, // doomednum
S_YHORIZ1, // spawnstate
1, // spawnhealth
S_YHORIZ2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6316,9 +6424,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
559, // doomednum
S_RHORIZ1, // spawnstate
1, // spawnhealth
S_RHORIZ2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6343,9 +6451,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
560, // doomednum
S_BHORIZ1, // spawnstate
1, // spawnhealth
S_BHORIZ2, // seestate
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
@ -6360,7 +6468,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
32*FRACUNIT, // height
0, // display offset
0, // mass
4*FRACUNIT, // damage
1*FRACUNIT, // damage
sfx_None, // activesound
MF_SPRING|MF_NOGRAVITY, // flags
S_BHORIZ2 // raisestate
@ -13760,7 +13868,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
3*FRACUNIT, // speed
8*FRACUNIT, // radius
8*FRACUNIT, // height
0, // display offset
1, // display offset
100, // mass
0, // damage
sfx_None, // activesound

View file

@ -232,6 +232,7 @@ void A_MultiShotDist();
void A_WhoCaresIfYourSonIsABee();
void A_ParentTriesToSleep();
void A_CryingToMomma();
void A_CheckFlags2();
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
#define NUMMOBJFREESLOTS 256
@ -335,10 +336,8 @@ typedef enum sprite
SPR_EMER, // Emerald Hunt
// Interactive Objects
SPR_FANS,
SPR_BBLS, // water bubble source
SPR_SIGN, // Level end sign
SPR_STEM, // Steam riser
SPR_SPIK, // Spike Ball
SPR_SFLM, // Spin fire
SPR_USPK, // Floor spike
@ -346,7 +345,6 @@ typedef enum sprite
SPR_WSPB, // Wall spike base
SPR_STPT, // Starpost
SPR_BMNE, // Big floating mine
SPR_BMNB,
// Monitor Boxes
SPR_MSTV, // MiSc TV sprites
@ -514,11 +512,16 @@ typedef enum sprite
SPR_FS02, // Bat
// Springs
SPR_SPRY, // yellow spring
SPR_SPRR, // red spring
SPR_SPRB, // Blue springs
SPR_FANS, // Fan
SPR_STEM, // Steam riser
SPR_BUMP, // Bumpers
SPR_BLON, // Balloons
SPR_SPRY, // Yellow spring
SPR_SPRR, // Red spring
SPR_SPRB, // Blue spring
SPR_YSPR, // Yellow Diagonal Spring
SPR_RSPR, // Red Diagonal Spring
SPR_BSPR, // Blue Diagonal Spring
SPR_SSWY, // Yellow Side Spring
SPR_SSWR, // Red Side Spring
SPR_SSWB, // Blue Side Spring
@ -607,11 +610,12 @@ typedef enum sprite
SPR_HBAT,
// Debris
SPR_SPRK, // spark
SPR_SPRK, // Sparkle
SPR_BOM1, // Robot Explosion
SPR_BOM2, // Boss Explosion 1
SPR_BOM3, // Boss Explosion 2
SPR_BOM4, // Underwater Explosion
SPR_BMNB, // Mine Explosion
// Crumbly rocks
SPR_ROIA,
@ -1757,12 +1761,6 @@ typedef enum state
// Emeralds (for hunt)
S_EMER1,
S_FAN,
S_FAN2,
S_FAN3,
S_FAN4,
S_FAN5,
// Bubble Source
S_BUBBLES1,
S_BUBBLES2,
@ -1824,16 +1822,6 @@ typedef enum state
S_SIGN52, // Eggman
S_SIGN53,
// Steam Riser
S_STEAM1,
S_STEAM2,
S_STEAM3,
S_STEAM4,
S_STEAM5,
S_STEAM6,
S_STEAM7,
S_STEAM8,
// Spike Ball
S_SPIKEBALL1,
S_SPIKEBALL2,
@ -2842,19 +2830,51 @@ typedef enum state
S_SECRETFLICKY_02_FLAP2,
S_SECRETFLICKY_02_FLAP3,
// Fan
S_FAN,
S_FAN2,
S_FAN3,
S_FAN4,
S_FAN5,
// Steam Riser
S_STEAM1,
S_STEAM2,
S_STEAM3,
S_STEAM4,
S_STEAM5,
S_STEAM6,
S_STEAM7,
S_STEAM8,
// Bumpers
S_BUMPER,
S_BUMPERHIT,
// Balloons
S_BALLOON,
S_BALLOONPOP1,
S_BALLOONPOP2,
S_BALLOONPOP3,
S_BALLOONPOP4,
S_BALLOONPOP5,
S_BALLOONPOP6,
// Yellow Spring
S_YELLOWSPRING,
S_YELLOWSPRING2,
S_YELLOWSPRING3,
S_YELLOWSPRING4,
S_YELLOWSPRING5,
// Red Spring
S_REDSPRING,
S_REDSPRING2,
S_REDSPRING3,
S_REDSPRING4,
S_REDSPRING5,
// Blue Springs
// Blue Spring
S_BLUESPRING,
S_BLUESPRING2,
S_BLUESPRING3,
@ -2881,6 +2901,16 @@ typedef enum state
S_RDIAG7,
S_RDIAG8,
// Blue Diagonal Spring
S_BDIAG1,
S_BDIAG2,
S_BDIAG3,
S_BDIAG4,
S_BDIAG5,
S_BDIAG6,
S_BDIAG7,
S_BDIAG8,
// Yellow Side Spring
S_YHORIZ1,
S_YHORIZ2,
@ -3000,6 +3030,7 @@ typedef enum state
S_SCRI, // 4000 (mario)
S_SCRJ, // 8000 (mario)
S_SCRK, // 1UP (mario)
S_SCRL, // 10
// Drowning Timer Numbers
S_ZERO1,
@ -3652,15 +3683,19 @@ typedef enum mobj_type
// Springs and others
MT_FAN,
MT_STEAM, // Steam riser
MT_BLUESPRING,
MT_STEAM,
MT_BUMPER,
MT_BALLOON,
MT_YELLOWSPRING,
MT_REDSPRING,
MT_YELLOWDIAG, // Yellow Diagonal Spring
MT_REDDIAG, // Red Diagonal Spring
MT_YELLOWHORIZ, // Yellow Side Spring
MT_REDHORIZ, // Red Side Spring
MT_BLUEHORIZ, // Blue Side Spring
MT_BLUESPRING,
MT_YELLOWDIAG,
MT_REDDIAG,
MT_BLUEDIAG,
MT_YELLOWHORIZ,
MT_REDHORIZ,
MT_BLUEHORIZ,
// Interactive Objects
MT_BUBBLES, // Bubble source

View file

@ -259,6 +259,7 @@ void A_MultiShotDist(mobj_t *actor);
void A_WhoCaresIfYourSonIsABee(mobj_t *actor);
void A_ParentTriesToSleep(mobj_t *actor);
void A_CryingToMomma(mobj_t *actor);
void A_CheckFlags2(mobj_t *actor);
//for p_enemy.c
//
@ -763,6 +764,12 @@ static boolean P_LookForShield(mobj_t *actor)
&& (P_AproxDistance(P_AproxDistance(actor->x-player->mo->x, actor->y-player->mo->y), actor->z-player->mo->z) < FixedMul(RING_DIST, player->mo->scale)))
{
P_SetTarget(&actor->tracer, player->mo);
if (actor->hnext)
P_SetTarget(&actor->hnext->hprev, actor->hprev);
if (actor->hprev)
P_SetTarget(&actor->hprev->hnext, actor->hnext);
return true;
}
}
@ -10383,25 +10390,15 @@ void A_SpawnFreshCopy(mobj_t *actor)
return;
#endif
newObject = P_SpawnMobj(actor->x, actor->y, actor->z, actor->type);
newObject = P_SpawnMobjFromMobj(actor, 0, 0, 0, actor->type);
newObject->flags2 = actor->flags2 & MF2_AMBUSH;
newObject->angle = actor->angle;
newObject->flags2 |= (actor->flags2 & (MF2_AMBUSH|MF2_OBJECTFLIP));
newObject->eflags |= (actor->eflags & MFE_VERTICALFLIP);
P_SetScale(newObject, actor->scale);
newObject->destscale = actor->destscale;
newObject->color = actor->color;
P_SetTarget(&newObject->target, actor->target);
P_SetTarget(&newObject->tracer, actor->tracer);
if (newObject->info->seesound)
S_StartSound(newObject, newObject->info->seesound);
if (actor->spawnpoint)
{
newObject->spawnpoint = actor->spawnpoint;
actor->spawnpoint->mobj = newObject;
actor->spawnpoint = NULL;
}
}
// Internal Flicky spawning function.
@ -11314,3 +11311,23 @@ void A_CryingToMomma(mobj_t *actor)
actor->flags = MF_NOBLOCKMAP|MF_NOCLIPTHING;
P_SetThingPosition(actor);
}
// Function: A_CheckFlags2
//
// Description: If actor->flags2 & var1, goto var2.
//
// var1 = mask
// var2 = state to go
//
void A_CheckFlags2(mobj_t *actor)
{
INT32 locvar1 = var1;
INT32 locvar2 = var2;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_CheckFlags2", actor))
return;
#endif
if (actor->flags2 & locvar1)
P_SetMobjState(actor, (statenum_t)locvar2);
}

View file

@ -115,6 +115,7 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z)
// mass = vertical speed
// damage = horizontal speed
// raisestate = state to change spring to on collision
// reactiontime = number of times it can give 10 points (0 is standard)
// painchance = spring mode:
// 0 = standard vanilla spring behaviour
// Positive spring modes are minor variants of vanilla spring behaviour.
@ -123,17 +124,14 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z)
// Negative spring modes are mildly-related gimmicks with customisation.
// -1 = pinball bumper
// Any other spring mode defaults to standard vanilla spring behaviour,
// ***** but forward compatibility is not guaranteed for these. *****
// ****** but forward compatibility is not guaranteed for these. ******
//
boolean P_DoSpring(mobj_t *spring, mobj_t *object)
{
fixed_t vertispeed = spring->info->mass;
fixed_t horizspeed = spring->info->damage;
// Does nothing?
if (!vertispeed && !horizspeed)
return false;
boolean final;
// Object was already sprung this tic
if (object->eflags & MFE_SPRUNG)
@ -153,9 +151,12 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
// Some of the attributes mean different things here.
// mass = default strength (can be controlled by mapthing's spawnangle)
// damage = unused
// reactiontime = number of times it can give points
angle_t horizangle, vertiangle;
if (object->player && object->player->homing) // Sonic Heroes, the only game to contain homing-attackable bumpers!
if (!vertispeed)
return false;
if (object->player && object->player->homing) // Sonic Heroes and Shadow the Hedgehog are the only games to contain homing-attackable bumpers!
{
horizangle = 0;
vertiangle = ((object->eflags & MFE_VERTICALFLIP) ? ANGLE_270 : ANGLE_90) >> ANGLETOFINESHIFT;
@ -190,16 +191,32 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
if (object->player->powers[pw_carry] == CR_NIGHTSMODE) // THIS has NiGHTS support, at least...
{
angle_t nightsangle = 0;
if (object->player->bumpertime >= TICRATE/4)
return false;
if ((object->player->pflags & PF_TRANSFERTOCLOSEST) && object->player->axis1 && object->player->axis2)
{
nightsangle = R_PointToAngle2(object->player->axis1->x, object->player->axis1->y, object->player->axis2->x, object->player->axis2->y);
nightsangle += ANGLE_90;
}
else if (object->target)
{
if (object->target->flags2 & MF2_AMBUSH)
nightsangle = R_PointToAngle2(object->target->x, object->target->y, object->x, object->y);
else
nightsangle = R_PointToAngle2(object->x, object->y, object->target->x, object->target->y);
}
object->player->flyangle = AngleFixed(R_PointToAngle2(
0,
spring->z + spring->height/2,
FixedMul(
FINECOSINE((object->angle >> ANGLETOFINESHIFT) & FINEMASK),
FINESINE(((nightsangle - horizangle) >> ANGLETOFINESHIFT) & FINEMASK),
FixedHypot(object->x - spring->x, object->y - spring->y)),
object->z + object->height/2))>>FRACBITS;
object->player->bumpertime = TICRATE/2;
}
else
@ -214,30 +231,18 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
}
}
object->eflags |= MFE_SPRUNG; // apply this flag asap!
object->momz = FixedMul(vertispeed, FINESINE(vertiangle));
if (!P_IsObjectOnGround(object)) // prevents uncurling when spinning due to "landing"
object->momz = FixedMul(vertispeed, FINESINE(vertiangle));
P_InstaThrust(object, horizangle, FixedMul(vertispeed, FINECOSINE(vertiangle)));
if ((statenum_t)(spring->state-states) == spring->info->spawnstate)
{
P_SetMobjState(spring, spring->info->raisestate);
if (object->player && spring->reactiontime)
{
mobj_t *scoremobj = P_SpawnMobj(spring->x, spring->y, spring->z + (spring->height/2), MT_SCORE);
P_SetMobjState(scoremobj, mobjinfo[MT_SCORE].spawnstate);//+11); -- 10 points state not hardcoded yet
P_AddPlayerScore(object->player, 10);
spring->reactiontime--;
}
}
return false;
object->eflags |= MFE_SPRUNG; // apply this flag asap!
goto springstate;
}
if (object->player && (object->player->powers[pw_carry] == CR_NIGHTSMODE))
{
/*Someone want to make these work like bumpers?*/
// Does nothing?
if (!vertispeed && !horizspeed)
return false;
}
#ifdef ESLOPE
object->standingslope = NULL; // Okay, now we know it's not going to be relevant - no launching off at silly angles for you.
@ -246,6 +251,12 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
if (spring->eflags & MFE_VERTICALFLIP)
vertispeed *= -1;
if (object->player && (object->player->powers[pw_carry] == CR_NIGHTSMODE))
{
/*Someone want to make these work like bumpers?*/
return false;
}
if (object->player
&& ((object->player->charability == CA_TWINSPIN && object->player->panim == PA_ABILITY)
|| (object->player->charability2 == CA2_MELEE && object->player->panim == PA_ABILITY2)))
@ -307,8 +318,6 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
// Re-solidify
spring->flags |= (spring->info->flags & (MF_SPRING|MF_SPECIAL));
P_SetMobjState(spring, spring->info->raisestate);
if (object->player)
{
INT32 pflags;
@ -374,7 +383,22 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
object->standingslope = NULL; // And again.
#endif
return true;
final = true;
springstate:
if ((statenum_t)(spring->state-states) < spring->info->raisestate)
{
P_SetMobjState(spring, spring->info->raisestate);
if (object->player && spring->reactiontime && !(spring->info->flags & MF_ENEMY))
{
mobj_t *scoremobj = P_SpawnMobj(spring->x, spring->y, spring->z + (spring->height/2), MT_SCORE);
P_SetMobjState(scoremobj, mobjinfo[MT_SCORE].spawnstate+11);
P_AddPlayerScore(object->player, 10);
spring->reactiontime--;
}
}
return final;
}
static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object)

View file

@ -8581,6 +8581,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_FLICKY_08:
mobj->color = (P_RandomChance(FRACUNIT/2) ? SKINCOLOR_RED : SKINCOLOR_AQUA);
break;
case MT_BALLOON:
mobj->color = SKINCOLOR_RED;
break;
case MT_HIVEELEMENTAL:
mobj->extravalue1 = 5;
break;
@ -9873,6 +9876,10 @@ void P_SpawnMapThing(mapthing_t *mthing)
else
mobj->health = FixedMul(ss->sector->ceilingheight-ss->sector->floorheight, 3*(FRACUNIT/4))>>FRACBITS;
break;
case MT_BALLOON:
if (mthing->angle > 0)
mobj->color = ((mthing->angle-1) % (MAXSKINCOLORS-1))+1;
break;
case MT_WATERDRIP:
if (mthing->angle)
mobj->tics = 3*TICRATE + mthing->angle;

View file

@ -8163,7 +8163,6 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet)
mobj_t *mo;
thinker_t *think;
mobj_t *closestmo = NULL;
const UINT32 targetmask = (MF_ENEMY|MF_BOSS|(nonenemies ? (MF_MONITOR|MF_SPRING) : 0));
const fixed_t maxdist = FixedMul((bullet ? RING_DIST*2 : RING_DIST), player->mo->scale);
const angle_t span = (bullet ? ANG30 : ANGLE_90);
fixed_t dist, closestdist = 0;
@ -8174,7 +8173,7 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet)
continue; // not a mobj thinker
mo = (mobj_t *)think;
if (!(mo->flags & targetmask) == !(mo->flags2 & MF2_INVERTAIMABLE)) // allows if it has the flags desired XOR it has the invert aimable flag
if (!(mo->flags & (MF_ENEMY|MF_BOSS|MF_MONITOR|MF_SPRING)) == !(mo->flags2 & MF2_INVERTAIMABLE)) // allows if it has the flags desired XOR it has the invert aimable flag
continue; // not a valid target
if (mo->health <= 0) // dead
@ -8189,6 +8188,9 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet)
if ((mo->flags & (MF_ENEMY|MF_BOSS)) && !(mo->flags & MF_SHOOTABLE)) // don't aim at something you can't shoot at anyway (see Egg Guard or Minus)
continue;
if (!nonenemies && mo->flags & (MF_MONITOR|MF_SPRING))
continue;
if (!bullet && mo->type == MT_DETON) // Don't be STUPID, Sonic!
continue;
@ -8226,7 +8228,7 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet)
if (closestmo && dist > closestdist)
continue;
if ((R_PointToAngle2(player->mo->x, player->mo->y, mo->x, mo->y) - player->mo->angle + span) > span*2)
if ((R_PointToAngle2(player->mo->x + P_ReturnThrustX(player->mo, player->mo->angle, player->mo->radius), player->mo->y + P_ReturnThrustY(player->mo, player->mo->angle, player->mo->radius), mo->x, mo->y) - player->mo->angle + span) > span*2)
continue; // behind back
if (!P_CheckSight(player->mo, mo))

View file

@ -257,7 +257,7 @@ const UINT8 Color_Index[MAXTRANSLATIONS-1][16] = {
{0x00, 0x50, 0x50, 0x51, 0x51, 0x52, 0x52, 0x52, 0x54, 0x54, 0x54, 0x54, 0x55, 0x56, 0x57, 0xf5}, // SKINCOLOR_SUPERTAN2
{0x50, 0x51, 0x51, 0x52, 0x52, 0x52, 0x54, 0x54, 0x54, 0x54, 0x55, 0x56, 0x57, 0xf5, 0xf7, 0xf9}, // SKINCOLOR_SUPERTAN3
{0x51, 0x52, 0x52, 0x52, 0x52, 0x54, 0x54, 0x54, 0x55, 0x56, 0x57, 0xf5, 0xf7, 0xf9, 0xfb, 0xed}, // SKINCOLOR_SUPERTAN4
{0x52, 0x52, 0x54, 0x54, 0x54, 0x55, 0x56, 0x57, 0xf5, 0xf7, 0xf9, 0xfb, 0xed, 0xee, 0xef, 0xef} // SKINCOLOR_SUPERTAN5
{0x52, 0x52, 0x54, 0x54, 0x54, 0x55, 0x56, 0x57, 0xf5, 0xf7, 0xf9, 0xfb, 0xed, 0xee, 0xef, 0xef} // SKINCOLOR_SUPERTAN5
};
// See also the enum skincolors_t