* DrT's Spincushion hardcoded.

* Make the MF_PAIN stuff ONLY depend on mass, using the bottom 8 bits for the type and the custom sound in the upper ones.
* A bunch of cleanup of random other stuff, including an unused Deton state and an unused Jetty type's sprite.
This commit is contained in:
toasterbabe 2018-05-13 14:09:20 +01:00
parent 8a61d87961
commit a738ef99e3
10 changed files with 172 additions and 107 deletions

View file

@ -1704,6 +1704,7 @@ static actionpointer_t actionpointers[] =
{{A_SnailerThink}, "A_SNAILERTHINK"},
{{A_SharpChase}, "A_SHARPCHASE"},
{{A_SharpSpin}, "A_SHARPSPIN"},
{{A_SharpDecel}, "A_SHARPDECEL"},
{{A_VultureVtol}, "A_VULTUREVTOL"},
{{A_VultureCheck}, "A_VULTURECHECK"},
{{A_SkimChase}, "A_SKIMCHASE"},
@ -3624,7 +3625,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_DETON13",
"S_DETON14",
"S_DETON15",
"S_DETON16",
// Skim Mine Dropper
"S_SKIM1",
@ -3666,14 +3666,25 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_TURRETPOPDOWN7",
"S_TURRETPOPDOWN8",
// Sharp
"S_SHARP_ROAM1",
"S_SHARP_ROAM2",
"S_SHARP_AIM1",
"S_SHARP_AIM2",
"S_SHARP_AIM3",
"S_SHARP_AIM4",
"S_SHARP_SPIN",
// Spincushion
"S_SPINCUSHION_LOOK",
"S_SPINCUSHION_CHASE1",
"S_SPINCUSHION_CHASE2",
"S_SPINCUSHION_CHASE3",
"S_SPINCUSHION_CHASE4",
"S_SPINCUSHION_AIM1",
"S_SPINCUSHION_AIM2",
"S_SPINCUSHION_AIM3",
"S_SPINCUSHION_AIM4",
"S_SPINCUSHION_AIM5",
"S_SPINCUSHION_SPIN1",
"S_SPINCUSHION_SPIN2",
"S_SPINCUSHION_SPIN3",
"S_SPINCUSHION_SPIN4",
"S_SPINCUSHION_STOP1",
"S_SPINCUSHION_STOP2",
"S_SPINCUSHION_STOP3",
"S_SPINCUSHION_STOP4",
// Jet Jaw
"S_JETJAW_ROAM1",
@ -6161,7 +6172,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_SKIM", // Skim mine dropper
"MT_TURRET",
"MT_POPUPTURRET",
"MT_SHARP", // Sharp
"MT_SPINCUSHION", // Spincushion
"MT_JETJAW", // Jet Jaw
"MT_SNAILER", // Snailer
"MT_VULTURE", // Vulture

View file

@ -62,7 +62,7 @@ static dynlights_t *dynlights = &view_dynlights[0];
light_t lspr[NUMLIGHTS] =
{
// type offset x, y coronas color, c_size,light color,l_radius, sqr radius computed at init
// UNDEFINED: 0
// NOLIGHT: 0
{ UNDEFINED_SPR, 0.0f, 0.0f, 0x00000000, 24.0f, 0x00000000, 0.0f, 0.0f},
// weapons
// RINGSPARK_L
@ -151,10 +151,9 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_POSS
&lspr[NOLIGHT], // SPR_SPOS
&lspr[NOLIGHT], // SPR_FISH
&lspr[NOLIGHT], // SPR_BUZZ Graue 03-10-2004
&lspr[NOLIGHT], // SPR_RBUZ Graue 03-10-2004
&lspr[NOLIGHT], // SPR_BUZZ
&lspr[NOLIGHT], // SPR_RBUZ
&lspr[NOLIGHT], // SPR_JETB
&lspr[NOLIGHT], // SPR_JETW
&lspr[NOLIGHT], // SPR_JETG
&lspr[NOLIGHT], // SPR_CCOM
&lspr[NOLIGHT], // SPR_DETN
@ -226,8 +225,8 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_RING
&lspr[NOLIGHT], // SPR_TRNG
&lspr[NOLIGHT], // SPR_TOKE
&lspr[REDBALL_L], // SPR_RFLG
&lspr[BLUEBALL_L], // SPR_BFLG
&lspr[REDBALL_L], // SPR_RFLG
&lspr[BLUEBALL_L], // SPR_BFLG
&lspr[NOLIGHT], // SPR_NWNG
&lspr[NOLIGHT], // SPR_EMBM
&lspr[NOLIGHT], // SPR_CEMG
@ -304,7 +303,7 @@ light_t *t_lspr[NUMSPRITES] =
// Techno Hill Scenery
&lspr[NOLIGHT], // SPR_THZP
&lspr[NOLIGHT], // SPR_FWR5
&lspr[REDBALL_L], // SPR_ALRM
&lspr[REDBALL_L], // SPR_ALRM
// Deep Sea Scenery
&lspr[NOLIGHT], // SPR_GARG
@ -381,8 +380,8 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_FIRS
&lspr[NOLIGHT], // SPR_BUBS
&lspr[NOLIGHT], // SPR_ZAPS
&lspr[INVINCIBLE_L], // SPR_IVSP
&lspr[SUPERSPARK_L], // SPR_SSPK
&lspr[INVINCIBLE_L], // SPR_IVSP
&lspr[SUPERSPARK_L], // SPR_SSPK
&lspr[NOLIGHT], // SPR_GOAL
@ -410,7 +409,7 @@ light_t *t_lspr[NUMSPRITES] =
// Springs
&lspr[NOLIGHT], // SPR_SPRY
&lspr[NOLIGHT], // SPR_SPRR
&lspr[NOLIGHT], // SPR_SPRB Graue
&lspr[NOLIGHT], // SPR_SPRB
&lspr[NOLIGHT], // SPR_YSPR
&lspr[NOLIGHT], // SPR_RSPR
&lspr[NOLIGHT], // SPR_SSWY
@ -428,7 +427,7 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_DUST
&lspr[NOLIGHT], // SPR_FPRT
&lspr[SUPERSPARK_L], // SPR_TFOG
&lspr[NIGHTSLIGHT_L], // SPR_SEED // Sonic CD flower seed
&lspr[NIGHTSLIGHT_L], // SPR_SEED
&lspr[NOLIGHT], // SPR_PRTL
// Game Indicators
@ -467,19 +466,19 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_GOOM
&lspr[NOLIGHT], // SPR_BGOM
&lspr[REDBALL_L], // SPR_FFWR
&lspr[SMALLREDBALL_L], // SPR_FBLL
&lspr[SMALLREDBALL_L], // SPR_FBLL
&lspr[NOLIGHT], // SPR_SHLL
&lspr[REDBALL_L], // SPR_PUMA
&lspr[REDBALL_L], // SPR_PUMA
&lspr[NOLIGHT], // SPR_HAMM
&lspr[NOLIGHT], // SPR_KOOP
&lspr[REDBALL_L], // SPR_BFLM
&lspr[REDBALL_L], // SPR_BFLM
&lspr[NOLIGHT], // SPR_MAXE
&lspr[NOLIGHT], // SPR_MUS1
&lspr[NOLIGHT], // SPR_MUS2
&lspr[NOLIGHT], // SPR_TOAD
// NiGHTS Stuff
&lspr[SUPERSONIC_L], // SPR_NDRN // NiGHTS drone
&lspr[SUPERSONIC_L], // SPR_NDRN // NiGHTS drone
&lspr[NOLIGHT], // SPR_NSPK
&lspr[NOLIGHT], // SPR_NBMP
&lspr[NOLIGHT], // SPR_HOOP

View file

@ -36,18 +36,17 @@ char sprnames[NUMSPRITES + 1][5] =
"PLAY",
// Enemies
"POSS",
"SPOS",
"FISH", // Greenflower Fish
"POSS", // Crawla (Blue)
"SPOS", // Crawla (Red)
"FISH", // SDURF
"BUZZ", // Buzz (Gold)
"RBUZ", // Buzz (Red)
"JETB", // Jetty-Syn Bomber
"JETW", // Jetty-Syn Water Bomber
"JETG", // Jetty-Syn Gunner
"CCOM", // Crawla Commander
"DETN", // Deton
"SKIM", // Skim mine dropper
"TRET",
"TRET", // Industrial Turret
"TURR", // Pop-Up Turret
"SHRP", // Sharp
"JJAW", // Jet Jaw
@ -55,7 +54,7 @@ char sprnames[NUMSPRITES + 1][5] =
"VLTR", // Vulture
"PNTY", // Pointy
"ARCH", // Robo-Hood
"CBFS", // CastleBot FaceStabber (Egg Knight?)
"CBFS", // Castlebot Facestabber
"SPSH", // Egg Guard
"ESHI", // Egg Shield for Egg Guard
"GSNP", // Green Snapper
@ -845,7 +844,6 @@ state_t states[NUMSTATES] =
{SPR_DETN, 3, 1, {A_DetonChase}, 0, 0, S_DETON14}, // S_DETON13
{SPR_DETN, 2, 1, {A_DetonChase}, 0, 0, S_DETON15}, // S_DETON14
{SPR_DETN, 1, 1, {A_DetonChase}, 0, 0, S_DETON2}, // S_DETON15
{SPR_DETN, 0, -1, {NULL}, 0, 0, S_DETON16}, // S_DETON16
// Skim Mine Dropper
{SPR_SKIM, 0, 1, {A_SkimChase}, 0, 0, S_SKIM2}, // S_SKIM1
@ -886,14 +884,25 @@ state_t states[NUMSTATES] =
{SPR_TURR, 1, 2, {NULL}, 0, 0, S_TURRETPOPDOWN8}, // S_TURRETPOPDOWN7
{SPR_TURR, 0, 69,{A_SetTics}, 0, 1, S_TURRETLOOK}, // S_TURRETPOPDOWN8
// Sharp
{SPR_SHRP, 0, 1, {A_Look}, 0, 0, S_SHARP_ROAM1}, // S_SHARP_ROAM1,
{SPR_SHRP, 0, 1, {A_SharpChase}, 0, 0, S_SHARP_ROAM2}, // S_SHARP_ROAM2,
{SPR_SHRP, 1, 2, {A_FaceTarget}, 0, 0, S_SHARP_AIM2}, // S_SHARP_AIM1,
{SPR_SHRP, 2, 2, {A_FaceTarget}, 0, 0, S_SHARP_AIM3}, // S_SHARP_AIM2,
{SPR_SHRP, 3, 2, {A_FaceTarget}, 0, 0, S_SHARP_AIM4}, // S_SHARP_AIM3,
{SPR_SHRP, 4, 7, {A_FaceTarget}, 0, 0, S_SHARP_SPIN}, // S_SHARP_AIM4,
{SPR_SHRP, 4, 1, {A_SharpSpin}, 0, 0, S_SHARP_SPIN}, // S_SHARP_SPIN,
// Spincushion
{SPR_SHRP, 0, 2, {A_Look}, 0, 0, S_SPINCUSHION_LOOK}, // S_SPINCUSHION_LOOK
{SPR_SHRP, 1, 2, {A_SharpChase}, 0, 0, S_SPINCUSHION_CHASE2}, // S_SPINCUSHION_CHASE1
{SPR_SHRP, 2, 2, {A_SharpChase}, 0, 0, S_SPINCUSHION_CHASE3}, // S_SPINCUSHION_CHASE2
{SPR_SHRP, 3, 2, {A_SharpChase}, 0, 0, S_SPINCUSHION_CHASE4}, // S_SPINCUSHION_CHASE3
{SPR_SHRP, 0, 2, {A_SharpChase}, 0, 0, S_SPINCUSHION_CHASE1}, // S_SPINCUSHION_CHASE4
{SPR_SHRP, 0, 2, {NULL}, 0, 0, S_SPINCUSHION_AIM2}, // S_SPINCUSHION_AIM1
{SPR_SHRP, 4, 2, {NULL}, 0, 0, S_SPINCUSHION_AIM3}, // S_SPINCUSHION_AIM2
{SPR_SHRP, 5, 2, {A_SetObjectFlags}, MF_PAIN, 2, S_SPINCUSHION_AIM4}, // S_SPINCUSHION_AIM3
{SPR_SHRP, 6, 16, {A_MultiShotDist}, (MT_DUST<<16)|6, -32, S_SPINCUSHION_AIM5}, // S_SPINCUSHION_AIM4
{SPR_SHRP, 6, 0, {A_PlaySound}, sfx_shrpgo, 1, S_SPINCUSHION_SPIN1}, // S_SPINCUSHION_AIM5
{SPR_SHRP, 6, 1, {A_SharpSpin}, 0, 0, S_SPINCUSHION_SPIN2}, // S_SPINCUSHION_SPIN1
{SPR_SHRP, 8, 1, {A_SharpSpin}, 0, 0, S_SPINCUSHION_SPIN3}, // S_SPINCUSHION_SPIN2
{SPR_SHRP, 7, 1, {A_SharpSpin}, 0, 0, S_SPINCUSHION_SPIN4}, // S_SPINCUSHION_SPIN3
{SPR_SHRP, 8, 1, {A_SharpSpin}, MT_SPINDUST, 0, S_SPINCUSHION_SPIN1}, // S_SPINCUSHION_SPIN4
{SPR_SHRP, 6, 1, {A_PlaySound}, sfx_s3k69, 1, S_SPINCUSHION_STOP2}, // S_SPINCUSHION_STOP1
{SPR_SHRP, 6, 4, {A_SharpDecel}, 0, 0, S_SPINCUSHION_STOP2}, // S_SPINCUSHION_STOP2
{SPR_SHRP, 5, 4, {A_FaceTarget}, 0, 0, S_SPINCUSHION_STOP4}, // S_SPINCUSHION_STOP3
{SPR_SHRP, 4, 4, {A_SetObjectFlags}, MF_PAIN, 1, S_SPINCUSHION_LOOK}, // S_SPINCUSHION_STOP4
// Jet Jaw
{SPR_JJAW, 0, 1, {A_JetJawRoam}, 0, 0, S_JETJAW_ROAM2}, // S_JETJAW_ROAM1
@ -3402,7 +3411,7 @@ state_t states[NUMSTATES] =
{SPR_DUST, FF_TRANS40, 4, {NULL}, 0, 0, S_DUST2}, // S_DUST1
{SPR_DUST, 1|FF_TRANS50, 5, {NULL}, 0, 0, S_DUST3}, // S_DUST2
{SPR_DUST, 2|FF_TRANS60, 3, {NULL}, 0, 0, S_DUST4}, // S_DUST3
{SPR_DUST, 3|FF_TRANS70, 2, {NULL}, 0, 0, S_NULL}, // S_DUST4
{SPR_DUST, 3|FF_TRANS70, 2, {NULL}, 0, 0, S_NULL}, // S_DUST4
{SPR_NULL, 0, 1, {A_RockSpawn}, 0, 0, S_ROCKSPAWN}, // S_ROCKSPAWN
@ -3795,7 +3804,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // meleestate
S_NULL, // missilestate
S_XPLD_FLICKY, // deathstate
S_DETON16, // xdeathstate
S_NULL, // xdeathstate
sfx_pop, // deathsound
1*FRACUNIT, // speed
20*FRACUNIT, // radius
@ -3889,29 +3898,29 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
(statenum_t)MT_JETTBULLET// raisestate
},
{ // MT_SHARP
{ // MT_SPINCUSHION
112, // doomednum
S_SHARP_ROAM1, // spawnstate
S_SPINCUSHION_LOOK, // spawnstate
1, // spawnhealth
S_SHARP_ROAM2, // seestate
S_SPINCUSHION_CHASE1, // seestate
sfx_None, // seesound
3*TICRATE, // reactiontime
sfx_s3kd8s, // attacksound
S_NULL, // painstate
5*TICRATE, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_SHARP_AIM1, // missilestate
sfx_shrpsp, // painsound
S_SPINCUSHION_STOP1, // meleestate
S_SPINCUSHION_AIM1, // missilestate
S_XPLD_FLICKY, // deathstate
S_SHARP_SPIN, // xdeathstate
S_SPINCUSHION_STOP3, // xdeathstate
sfx_pop, // deathsound
2, // speed
16*FRACUNIT, // radius
24*FRACUNIT, // height
0, // display offset
100, // mass
DMG_SPIKE, // mass
0, // damage
sfx_None, // activesound
sfx_s3kaa, // activesound
MF_ENEMY|MF_SPECIAL|MF_SHOOTABLE|MF_BOUNCE, // flags
S_NULL // raisestate
},
@ -15866,7 +15875,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_ghosty, // attacksound
sfx_None, // attacksound
S_NULL, // painstate
200, // painchance
sfx_None, // painsound
@ -15879,7 +15888,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
16*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
0, // mass
(sfx_ghosty<<8),// mass
20, // damage
sfx_None, // activesound
MF_PAIN|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
@ -15893,7 +15902,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_ghosty, // attacksound
sfx_None, // attacksound
S_NULL, // painstate
200, // painchance
sfx_None, // painsound
@ -15906,7 +15915,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
16*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
0, // mass
(sfx_ghosty<<8),// mass
20, // damage
sfx_None, // activesound
MF_PAIN|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags

View file

@ -103,6 +103,7 @@ void A_ArrowCheck();
void A_SnailerThink();
void A_SharpChase();
void A_SharpSpin();
void A_SharpDecel();
void A_VultureVtol();
void A_VultureCheck();
void A_SkimChase();
@ -243,18 +244,17 @@ typedef enum sprite
SPR_PLAY,
// Enemies
SPR_POSS,
SPR_SPOS,
SPR_FISH, // Greenflower Fish
SPR_POSS, // Crawla (Blue)
SPR_SPOS, // Crawla (Red)
SPR_FISH, // SDURF
SPR_BUZZ, // Buzz (Gold)
SPR_RBUZ, // Buzz (Red)
SPR_JETB, // Jetty-Syn Bomber
SPR_JETW, // Jetty-Syn Water Bomber
SPR_JETG, // Jetty-Syn Gunner
SPR_CCOM, // Crawla Commander
SPR_DETN, // Deton
SPR_SKIM, // Skim mine dropper
SPR_TRET,
SPR_TRET, // Industrial Turret
SPR_TURR, // Pop-Up Turret
SPR_SHRP, // Sharp
SPR_JJAW, // Jet Jaw
@ -262,7 +262,7 @@ typedef enum sprite
SPR_VLTR, // Vulture
SPR_PNTY, // Pointy
SPR_ARCH, // Robo-Hood
SPR_CBFS, // CastleBot FaceStabber (Egg Knight?)
SPR_CBFS, // Castlebot Facestabber
SPR_SPSH, // Egg Guard
SPR_ESHI, // Egg Shield for Egg Guard
SPR_GSNP, // Green Snapper
@ -961,7 +961,6 @@ typedef enum state
S_DETON13,
S_DETON14,
S_DETON15,
S_DETON16,
// Skim Mine Dropper
S_SKIM1,
@ -1003,14 +1002,25 @@ typedef enum state
S_TURRETPOPDOWN7,
S_TURRETPOPDOWN8,
// Sharp
S_SHARP_ROAM1,
S_SHARP_ROAM2,
S_SHARP_AIM1,
S_SHARP_AIM2,
S_SHARP_AIM3,
S_SHARP_AIM4,
S_SHARP_SPIN,
// Spincushion
S_SPINCUSHION_LOOK,
S_SPINCUSHION_CHASE1,
S_SPINCUSHION_CHASE2,
S_SPINCUSHION_CHASE3,
S_SPINCUSHION_CHASE4,
S_SPINCUSHION_AIM1,
S_SPINCUSHION_AIM2,
S_SPINCUSHION_AIM3,
S_SPINCUSHION_AIM4,
S_SPINCUSHION_AIM5,
S_SPINCUSHION_SPIN1,
S_SPINCUSHION_SPIN2,
S_SPINCUSHION_SPIN3,
S_SPINCUSHION_SPIN4,
S_SPINCUSHION_STOP1,
S_SPINCUSHION_STOP2,
S_SPINCUSHION_STOP3,
S_SPINCUSHION_STOP4,
// Jet Jaw
S_JETJAW_ROAM1,
@ -3520,7 +3530,7 @@ typedef enum mobj_type
MT_SKIM, // Skim mine dropper
MT_TURRET,
MT_POPUPTURRET,
MT_SHARP, // Sharp
MT_SPINCUSHION, // Spincushion
MT_JETJAW, // Jet Jaw
MT_SNAILER, // Snailer
MT_VULTURE, // Vulture

View file

@ -64,6 +64,7 @@ void A_ArrowCheck(mobj_t *actor);
void A_SnailerThink(mobj_t *actor);
void A_SharpChase(mobj_t *actor);
void A_SharpSpin(mobj_t *actor);
void A_SharpDecel(mobj_t *actor);
void A_VultureVtol(mobj_t *actor);
void A_VultureCheck(mobj_t *actor);
void A_SkimChase(mobj_t *actor);
@ -1491,7 +1492,7 @@ void A_SnailerThink(mobj_t *actor)
// Function: A_SharpChase
//
// Description: Thinker/Chase routine for Sharps
// Description: Thinker/Chase routine for Spincushions
//
// var1 = unused
// var2 = unused
@ -1503,12 +1504,6 @@ void A_SharpChase(mobj_t *actor)
return;
#endif
if (!actor->health)
{
P_SetMobjState(actor, actor->info->deathstate);
return;
}
if (actor->reactiontime)
{
INT32 delta;
@ -1551,40 +1546,73 @@ void A_SharpChase(mobj_t *actor)
// Function: A_SharpSpin
//
// Description: Spin chase routine for Sharps
// Description: Spin chase routine for Spincushions
//
// var1 = unused
// var2 = unused
// var1 = object # to spawn as dust (if not provided not done)
// var2 = if nonzero, do the old-style spinning using this as the angle difference
//
void A_SharpSpin(mobj_t *actor)
{
INT32 locvar1 = var1;
INT32 locvar2 = var2;
angle_t oldang = actor->angle;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_SharpSpin", actor))
return;
#endif
if (!actor->health)
{
P_SetMobjState(actor, actor->info->deathstate);
return;
}
if (actor->threshold && actor->target)
{
actor->angle += ANGLE_22h;
P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y), FixedMul(actor->info->speed*FRACUNIT, actor->scale));
angle_t ang = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y);
P_Thrust(actor, ang, actor->info->speed*actor->scale);
if (locvar2)
actor->angle += locvar2; // ANGLE_22h;
else
actor->angle = ang;
actor->threshold--;
if (leveltime & 1)
S_StartSound(actor, actor->info->painsound);
}
else
{
actor->reactiontime = actor->info->reactiontime;
P_SetMobjState(actor, actor->info->spawnstate);
var1 = 1;
A_Look(actor);
if (actor->target)
actor->angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y);
P_SetMobjState(actor, actor->info->meleestate);
}
if (!locvar1 || !P_IsObjectOnGround(actor))
return;
{
mobj_t *dust = P_SpawnMobjFromMobj(actor,
-P_ReturnThrustX(actor, oldang, 16<<FRACBITS),
-P_ReturnThrustY(actor, oldang, 16<<FRACBITS),
0, locvar1);
P_SetObjectMomZ(dust, P_RandomRange(1, 4)<<FRACBITS, false);
}
}
// Function: A_SharpDecel
//
// Description: Slow down the Spincushion
//
// var1 = unused
// var2 = unused
//
void A_SharpDecel(mobj_t *actor)
{
#ifdef HAVE_BLUA
if (LUA_CallAction("A_SharpDecel", actor))
return;
#endif
if (actor->momx > 2 || actor->momy > 2)
{
actor->momx >>= 1;
actor->momy >>= 1;
}
else
P_SetMobjState(actor, actor->info->xdeathstate);
}
// Function: A_VultureVtol

View file

@ -396,8 +396,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
&& P_DamageMobj(toucher, special, special, 1, DMG_SPIKE))
return; // Can only hit snapper from above
if (special->type == MT_SHARP
&& ((special->state == &states[special->info->xdeathstate]) || (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0)))
if (special->type == MT_SPINCUSHION
&& (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0))
{
if (player->pflags & PF_BOUNCING)
{
@ -406,7 +406,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
return;
}
else if (P_DamageMobj(toucher, special, special, 1, DMG_SPIKE))
return; // Cannot hit sharp from above or when red and angry
return; // Cannot hit sharp from above
}
if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))

View file

@ -683,11 +683,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; // underneath
if (tmthing->flags & MF_SHOOTABLE && thing->health > 0)
{
UINT8 damagetype = thing->info->mass;
UINT8 damagetype = (thing->info->mass & 0xFF);
if (!damagetype && thing->flags & MF_FIRE) // BURN!
damagetype = DMG_FIRE;
if (P_DamageMobj(tmthing, thing, thing, 1, damagetype) && thing->info->attacksound)
S_StartSound(thing, thing->info->attacksound);
if (P_DamageMobj(tmthing, thing, thing, 1, damagetype) && (damagetype = (thing->info->mass>>8)))
S_StartSound(thing, damagetype);
}
return true;
}
@ -700,11 +700,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; // underneath
if (thing->flags & MF_SHOOTABLE && tmthing->health > 0)
{
UINT8 damagetype = tmthing->info->mass;
UINT8 damagetype = (tmthing->info->mass & 0xFF);
if (!damagetype && tmthing->flags & MF_FIRE) // BURN!
damagetype = DMG_FIRE;
if (P_DamageMobj(thing, tmthing, tmthing, 1, damagetype) && tmthing->info->attacksound)
S_StartSound(tmthing, tmthing->info->attacksound);
if (P_DamageMobj(thing, tmthing, tmthing, 1, damagetype) && (damagetype = (tmthing->info->mass>>8)))
S_StartSound(tmthing, damagetype);
}
return true;
}

View file

@ -7439,6 +7439,10 @@ void P_MobjThinker(mobj_t *mobj)
mobj->z += FINESINE(mobj->extravalue1*(FINEMASK+1)/360);
P_SetThingPosition(mobj);
break;
case MT_SPINCUSHION:
if (mobj->target && mobj->state-states >= S_SPINCUSHION_AIM1 && mobj->state-states <= S_SPINCUSHION_AIM5)
mobj->angle = R_PointToAngle2(mobj->x, mobj->y, mobj->target->x, mobj->target->y);
break;
case MT_SMASHINGSPIKEBALL:
mobj->momx = mobj->momy = 0;
if (mobj->state-states == S_SMASHSPIKE_FALL && P_IsObjectOnGround(mobj))

View file

@ -65,7 +65,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"buzz1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Electric zap"},
{"buzz2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Electric zap"},
{"buzz3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wacky worksurface"},
{"buzz4", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Buzz"},
{"buzz4", true, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Buzz"},
{"crumbl", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crumbling"}, // Platform Crumble Tails 03-16-2001
{"fire", false, 8, 32, -1, NULL, 0, -1, -1, LUMPERROR, "Flamethrower"},
{"grind", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic grinding"},
@ -179,15 +179,17 @@ sfxinfo_t S_sfx[NUMSFX] =
{"spring", false, 112, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spring"},
{"statu1", true, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Pushing a statue"},
{"statu2", true, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Pushing a statue"},
{"strpst", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"}, // Starpost Sound Tails 07-04-2002
{"strpst", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"},
{"supert", true, 127, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Transformation"},
{"telept", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Dash"},
{"tink" , false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tink"},
{"token" , true, 224, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Token"}, // SS token
{"token" , true, 224, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Token"},
{"trfire", true, 60, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Laser fired"},
{"trpowr", true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"},
{"turhit", false, 40, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Laser hit"},
{"wdjump", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Whirlwind jump"},
{"shrpsp", true, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spincushion"},
{"shrpgo", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Launch"},
{"mswarp", false, 60, 16, -1, NULL, 0, -1, -1, LUMPERROR, "Spinning out"},
{"mspogo", false, 60, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Breaking through"},
{"boingf", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bouncing"},

View file

@ -254,6 +254,8 @@ typedef enum
sfx_trpowr,
sfx_turhit,
sfx_wdjump,
sfx_shrpsp,
sfx_shrpgo,
sfx_mswarp,
sfx_mspogo,
sfx_boingf,