make fan particles not crash kart maps
idk should hopefully not break them in durr maps
This commit is contained in:
parent
2f9c1631ca
commit
7b887a0c0a
5 changed files with 49 additions and 3 deletions
|
|
@ -279,6 +279,7 @@ actionpointer_t actionpointers[] =
|
|||
{{A_MineRange}, "A_MINERANGE"},
|
||||
{{A_ConnectToGround}, "A_CONNECTTOGROUND"},
|
||||
{{A_SpawnParticleRelative}, "A_SPAWNPARTICLERELATIVE"},
|
||||
{{A_ParticleSpawn}, "A_PARTICLESPAWN"},
|
||||
{{A_MultiShotDist}, "A_MULTISHOTDIST"},
|
||||
{{A_WhoCaresIfYourSonIsABee},"A_WHOCARESIFYOURSONISABEE"},
|
||||
{{A_ParentTriesToSleep}, "A_PARENTTRIESTOSLEEP"},
|
||||
|
|
@ -2709,6 +2710,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_SEED",
|
||||
|
||||
"S_PARTICLE",
|
||||
"S_PARTICLEGEN",
|
||||
|
||||
// Score Logos
|
||||
"S_SCRA", // 100
|
||||
|
|
|
|||
|
|
@ -3230,6 +3230,7 @@ state_t states[NUMSTATES] =
|
|||
|
||||
// Particle sprite
|
||||
{SPR_PRTL, 0, 2*TICRATE, {NULL}, 0, 0, S_NULL}, // S_PARTICLE
|
||||
{SPR_NULL, 0, 1, {A_ParticleSpawn}, 0, 0, S_PARTICLEGEN}, // S_PARTICLEGEN
|
||||
|
||||
{SPR_SCOR, 0, 32, {A_ScoreRise}, 0, 0, S_NULL}, // S_SCRA - 100
|
||||
{SPR_SCOR, 1, 32, {A_ScoreRise}, 0, 0, S_NULL}, // S_SCRB - 200
|
||||
|
|
@ -18539,7 +18540,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
|
||||
{ // MT_PARTICLEGEN
|
||||
757, // doomednum
|
||||
S_INVISIBLE, // spawnstate
|
||||
S_PARTICLEGEN, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
|
|
@ -18560,7 +18561,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOGRAVITY|MF_NOCLIPHEIGHT|MF_SCENERY, // flags
|
||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ enum actionnum
|
|||
A_MINERANGE,
|
||||
A_CONNECTTOGROUND,
|
||||
A_SPAWNPARTICLERELATIVE,
|
||||
A_PARTICLESPAWN,
|
||||
A_MULTISHOTDIST,
|
||||
A_WHOCARESIFYOURSONISABEE,
|
||||
A_PARENTTRIESTOSLEEP,
|
||||
|
|
@ -503,6 +504,7 @@ void A_MineExplode();
|
|||
void A_MineRange();
|
||||
void A_ConnectToGround();
|
||||
void A_SpawnParticleRelative();
|
||||
void A_ParticleSpawn();
|
||||
void A_MultiShotDist();
|
||||
void A_WhoCaresIfYourSonIsABee();
|
||||
void A_ParentTriesToSleep();
|
||||
|
|
@ -3685,6 +3687,7 @@ typedef enum state
|
|||
S_SEED,
|
||||
|
||||
S_PARTICLE,
|
||||
S_PARTICLEGEN,
|
||||
|
||||
// Score Logos
|
||||
S_SCRA, // 100
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ void A_MineExplode(mobj_t *actor);
|
|||
void A_MineRange(mobj_t *actor);
|
||||
void A_ConnectToGround(mobj_t *actor);
|
||||
void A_SpawnParticleRelative(mobj_t *actor);
|
||||
void A_ParticleSpawn(mobj_t *actor);
|
||||
void A_MultiShotDist(mobj_t *actor);
|
||||
void A_WhoCaresIfYourSonIsABee(mobj_t *actor);
|
||||
void A_ParentTriesToSleep(mobj_t *actor);
|
||||
|
|
@ -11150,7 +11151,6 @@ void A_SpawnParticleRelative(mobj_t *actor)
|
|||
if (LUA_CallAction(A_SPAWNPARTICLERELATIVE, actor))
|
||||
return;
|
||||
|
||||
|
||||
CONS_Debug(DBG_GAMELOGIC, "A_SpawnParticleRelative called from object type %d, var1: %d, var2: %d\n", actor->type, locvar1, locvar2);
|
||||
|
||||
x = (INT16)(locvar1>>16);
|
||||
|
|
@ -11173,6 +11173,40 @@ void A_SpawnParticleRelative(mobj_t *actor)
|
|||
P_SetMobjState(mo, state);
|
||||
}
|
||||
|
||||
void A_ParticleSpawn(mobj_t *actor)
|
||||
{
|
||||
INT32 locvar1 = var1;
|
||||
fixed_t speed;
|
||||
mobjtype_t type;
|
||||
mobj_t *spawn;
|
||||
|
||||
if (udmf) // dont make this crap work in durr maps kek
|
||||
return;
|
||||
|
||||
if (LUA_CallAction(A_PARTICLESPAWN, actor))
|
||||
return;
|
||||
|
||||
if (!actor->spawnpoint)
|
||||
{
|
||||
P_RemoveMobj(actor);
|
||||
return;
|
||||
}
|
||||
|
||||
if (locvar1)
|
||||
type = (mobjtype_t)locvar1;
|
||||
else
|
||||
type = MT_PARTICLE;
|
||||
|
||||
speed = FixedMul((actor->spawnpoint->angle >> 12)<<FRACBITS, actor->scale);
|
||||
|
||||
spawn = P_SpawnMobj(actor->x, actor->y, actor->z, type);
|
||||
P_SetScale(spawn, actor->scale);
|
||||
spawn->momz = speed;
|
||||
spawn->destscale = FixedDiv(spawn->scale<<FRACBITS, 100<<FRACBITS);
|
||||
spawn->scalespeed = FixedDiv(((actor->spawnpoint->angle >> 8) & 63) * actor->scale, 100<<FRACBITS);
|
||||
actor->tics = actor->spawnpoint->extrainfo + 1;
|
||||
}
|
||||
|
||||
// Function: A_MultiShotDist
|
||||
//
|
||||
// Description: Spawns multiple shots based on player proximity
|
||||
|
|
|
|||
|
|
@ -5378,6 +5378,9 @@ static void P_VerticalFlameJetSceneryThink(mobj_t *mobj)
|
|||
|
||||
static boolean P_ParticleGenSceneryThink(mobj_t *mobj)
|
||||
{
|
||||
if (!udmf)
|
||||
return false;
|
||||
|
||||
if (!mobj->lastlook)
|
||||
return false;
|
||||
|
||||
|
|
@ -11789,6 +11792,9 @@ static boolean P_SetupParticleGen(mapthing_t *mthing, mobj_t *mobj)
|
|||
INT32 line;
|
||||
const size_t mthingi = (size_t)(mthing - mapthings);
|
||||
|
||||
if (!udmf)
|
||||
return false;
|
||||
|
||||
// Find the corresponding linedef special, using args[6] as tag
|
||||
line = mthing->args[6] ? Tag_FindLineSpecial(15, mthing->args[6]) : -1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue