mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-17 18:21:10 +00:00
The contents of DSZ-f16.wad's LUA_A000 Lua script are in now
Thing type numbers may be changed later
This commit is contained in:
parent
7f4424b4a0
commit
a79d064d15
5 changed files with 247 additions and 0 deletions
|
@ -1806,6 +1806,7 @@ static actionpointer_t actionpointers[] =
|
|||
{{A_FlameParticle}, "A_FLAMEPARTICLE"},
|
||||
{{A_FadeOverlay}, "A_FADEOVERLAY"},
|
||||
{{A_Boss5Jump}, "A_BOSS5JUMP"},
|
||||
{{A_LightBeamReset}, "A_LIGHTBEAMRESET"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
|
@ -4748,6 +4749,33 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
// Blue Crystal
|
||||
"S_BLUECRYSTAL1",
|
||||
|
||||
// Kelp,
|
||||
"S_KELP",
|
||||
|
||||
// DSZ Stalagmites
|
||||
"S_DSZSTALAGMITE",
|
||||
"S_DSZ2STALAGMITE",
|
||||
|
||||
// DSZ Light beam
|
||||
"S_LIGHTBEAM1",
|
||||
"S_LIGHTBEAM2",
|
||||
"S_LIGHTBEAM3",
|
||||
"S_LIGHTBEAM4",
|
||||
"S_LIGHTBEAM5",
|
||||
"S_LIGHTBEAM6",
|
||||
"S_LIGHTBEAM7",
|
||||
"S_LIGHTBEAM8",
|
||||
"S_LIGHTBEAM9",
|
||||
"S_LIGHTBEAM10",
|
||||
"S_LIGHTBEAM11",
|
||||
"S_LIGHTBEAM12",
|
||||
"S_LIGHTBEAM13",
|
||||
"S_LIGHTBEAM14",
|
||||
"S_LIGHTBEAM15",
|
||||
"S_LIGHTBEAM16",
|
||||
"S_LIGHTBEAM17",
|
||||
"S_LIGHTBEAM18",
|
||||
|
||||
// CEZ Chain
|
||||
"S_CEZCHAIN",
|
||||
|
||||
|
@ -6153,6 +6181,10 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_CORAL2", // Coral 2
|
||||
"MT_CORAL3", // Coral 3
|
||||
"MT_BLUECRYSTAL", // Blue Crystal
|
||||
"MT_KELP", // Kelp
|
||||
"MT_DSZSTALAGMITE", // Deep Sea 1 Stalagmite
|
||||
"MT_DSZ2STALAGMITE", // Deep Sea 2 Stalagmite
|
||||
"MT_LIGHTBEAM", // DSZ Light beam
|
||||
|
||||
// Castle Eggman Scenery
|
||||
"MT_CHAIN", // CEZ Chain
|
||||
|
|
138
src/info.c
138
src/info.c
|
@ -202,6 +202,9 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"CRL2", // Coral 2
|
||||
"CRL3", // Coral 3
|
||||
"BCRY", // Blue Crystal
|
||||
"KELP", // Kelp
|
||||
"DSTG", // DSZ Stalagmites
|
||||
"LIBE", // DSZ Light beam
|
||||
|
||||
// Castle Eggman Scenery
|
||||
"CHAN", // CEZ Chain
|
||||
|
@ -1948,6 +1951,33 @@ state_t states[NUMSTATES] =
|
|||
// Blue Crystal
|
||||
{SPR_BCRY, FF_TRANS30, -1, {NULL}, 0, 0, S_NULL}, // S_BLUECRYSTAL1
|
||||
|
||||
// Kelp
|
||||
{SPR_KELP, 0, -1, {NULL}, 0, 0, S_NULL}, // S_KELP
|
||||
|
||||
// DSZ Stalagmites
|
||||
{SPR_DSTG, 0, -1, {NULL}, 0, 0, S_NULL}, // S_DSZSTALAGMITE
|
||||
{SPR_DSTG, 1, -1, {NULL}, 0, 0, S_NULL}, // S_DSZ2STALAGMITE
|
||||
|
||||
// DSZ Light beam
|
||||
{SPR_LIBE, 0|FF_TRANS80|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightBeamReset}, 0, 0, S_LIGHTBEAM2}, // S_LIGHTBEAM1
|
||||
{SPR_LIBE, 0|FF_TRANS80|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM3}, // S_LIGHTBEAM2
|
||||
{SPR_LIBE, 0|FF_TRANS70|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM4}, // S_LIGHTBEAM3
|
||||
{SPR_LIBE, 0|FF_TRANS70|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM5}, // S_LIGHTBEAM4
|
||||
{SPR_LIBE, 0|FF_TRANS60|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM6}, // S_LIGHTBEAM5
|
||||
{SPR_LIBE, 0|FF_TRANS60|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM7}, // S_LIGHTBEAM6
|
||||
{SPR_LIBE, 0|FF_TRANS50|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM8}, // S_LIGHTBEAM7
|
||||
{SPR_LIBE, 0|FF_TRANS40|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM9}, // S_LIGHTBEAM8
|
||||
{SPR_LIBE, 0|FF_TRANS30|FF_FULLBRIGHT|FF_PAPERSPRITE, 9, {NULL}, 0, 0, S_LIGHTBEAM10}, // S_LIGHTBEAM9
|
||||
{SPR_LIBE, 0|FF_TRANS40|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM11}, // S_LIGHTBEAM10
|
||||
{SPR_LIBE, 0|FF_TRANS50|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM12}, // S_LIGHTBEAM11
|
||||
{SPR_LIBE, 0|FF_TRANS60|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM13}, // S_LIGHTBEAM12
|
||||
{SPR_LIBE, 0|FF_TRANS60|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM14}, // S_LIGHTBEAM13
|
||||
{SPR_LIBE, 0|FF_TRANS70|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM15}, // S_LIGHTBEAM14
|
||||
{SPR_LIBE, 0|FF_TRANS70|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM16}, // S_LIGHTBEAM15
|
||||
{SPR_LIBE, 0|FF_TRANS80|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM17}, // S_LIGHTBEAM16
|
||||
{SPR_LIBE, 0|FF_TRANS80|FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {NULL}, 0, 0, S_LIGHTBEAM18}, // S_LIGHTBEAM17
|
||||
{SPR_NULL, 0, 2, {A_SetRandomTics}, 4, 35, S_LIGHTBEAM1}, // S_LIGHTBEAM18
|
||||
|
||||
// CEZ Chain
|
||||
{SPR_CHAN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CEZCHAIN
|
||||
|
||||
|
@ -8880,6 +8910,114 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_KELP
|
||||
1007, // doomednum
|
||||
S_KELP, // 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
|
||||
16*FRACUNIT, // radius
|
||||
292*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_NOBLOCKMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_DSZSTALAGMITE
|
||||
1008, // doomednum
|
||||
S_DSZSTALAGMITE, // 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
|
||||
8*FRACUNIT, // radius
|
||||
116*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_DSZ2STALAGMITE
|
||||
999, // doomednum
|
||||
S_DSZ2STALAGMITE, // 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
|
||||
8*FRACUNIT, // radius
|
||||
116*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_LIGHTBEAM
|
||||
1010, // doomednum
|
||||
S_LIGHTBEAM1, // 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
|
||||
16*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
0, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SCENERY|MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CHAIN
|
||||
1100, // doomednum
|
||||
S_CEZCHAIN, // spawnstate
|
||||
|
|
35
src/info.h
35
src/info.h
|
@ -218,6 +218,7 @@ void A_FlickyFlutter();
|
|||
void A_FlameParticle();
|
||||
void A_FadeOverlay();
|
||||
void A_Boss5Jump();
|
||||
void A_LightBeamReset();
|
||||
|
||||
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
|
||||
#define NUMMOBJFREESLOTS 256
|
||||
|
@ -401,6 +402,9 @@ typedef enum sprite
|
|||
SPR_CRL2, // Coral 2
|
||||
SPR_CRL3, // Coral 3
|
||||
SPR_BCRY, // Blue Crystal
|
||||
SPR_KELP, // Kelp
|
||||
SPR_DSTG, // DSZ Stalagmites
|
||||
SPR_LIBE, // DSZ Light beam
|
||||
|
||||
// Castle Eggman Scenery
|
||||
SPR_CHAN, // CEZ Chain
|
||||
|
@ -2056,6 +2060,33 @@ typedef enum state
|
|||
// Blue Crystal
|
||||
S_BLUECRYSTAL1,
|
||||
|
||||
// Kelp,
|
||||
S_KELP,
|
||||
|
||||
// DSZ Stalagmites
|
||||
S_DSZSTALAGMITE,
|
||||
S_DSZ2STALAGMITE,
|
||||
|
||||
// DSZ Light beam
|
||||
S_LIGHTBEAM1,
|
||||
S_LIGHTBEAM2,
|
||||
S_LIGHTBEAM3,
|
||||
S_LIGHTBEAM4,
|
||||
S_LIGHTBEAM5,
|
||||
S_LIGHTBEAM6,
|
||||
S_LIGHTBEAM7,
|
||||
S_LIGHTBEAM8,
|
||||
S_LIGHTBEAM9,
|
||||
S_LIGHTBEAM10,
|
||||
S_LIGHTBEAM11,
|
||||
S_LIGHTBEAM12,
|
||||
S_LIGHTBEAM13,
|
||||
S_LIGHTBEAM14,
|
||||
S_LIGHTBEAM15,
|
||||
S_LIGHTBEAM16,
|
||||
S_LIGHTBEAM17,
|
||||
S_LIGHTBEAM18,
|
||||
|
||||
// CEZ Chain
|
||||
S_CEZCHAIN,
|
||||
|
||||
|
@ -3481,6 +3512,10 @@ typedef enum mobj_type
|
|||
MT_CORAL2, // Coral 2
|
||||
MT_CORAL3, // Coral 3
|
||||
MT_BLUECRYSTAL, // Blue Crystal
|
||||
MT_KELP, // Kelp
|
||||
MT_DSZSTALAGMITE, // Deep Sea 1 Stalagmite
|
||||
MT_DSZ2STALAGMITE, // Deep Sea 2 Stalagmite
|
||||
MT_LIGHTBEAM, // DSZ Light beam
|
||||
|
||||
// Castle Eggman Scenery
|
||||
MT_CHAIN, // CEZ Chain
|
||||
|
|
|
@ -246,6 +246,7 @@ void A_FlickyFlutter(mobj_t *actor);
|
|||
void A_FlameParticle(mobj_t *actor);
|
||||
void A_FadeOverlay(mobj_t *actor);
|
||||
void A_Boss5Jump(mobj_t *actor);
|
||||
void A_LightBeamReset(mobj_t *actor);
|
||||
|
||||
//
|
||||
// ENEMY THINKING
|
||||
|
@ -10624,3 +10625,33 @@ void A_Boss5Jump(mobj_t *actor)
|
|||
actor->momz = FixedMul(v, FINESINE(theta >> ANGLETOFINESHIFT));
|
||||
// I hope that's all that's needed, ugh
|
||||
}
|
||||
|
||||
// Function: A_LightBeamReset
|
||||
// Description: Resets momentum and position for DSZ's projecting light beams
|
||||
//
|
||||
// var1 = unused
|
||||
// var2 = unused
|
||||
//
|
||||
void A_LightBeamReset(mobj_t *actor)
|
||||
{
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_LightBeamReset", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
P_SetScale(actor, FRACUNIT + P_SignedRandom()*FRACUNIT/256);
|
||||
actor->destscale = actor->scale;
|
||||
|
||||
if (!actor->spawnpoint)
|
||||
return; // this can't work properly welp
|
||||
|
||||
actor->momx = P_SignedRandom()*FINECOSINE((actor->spawnpoint->angle*ANG1)>>ANGLETOFINESHIFT)/128;
|
||||
actor->momy = P_SignedRandom()*FINESINE((actor->spawnpoint->angle*ANG1)>>ANGLETOFINESHIFT)/128;
|
||||
actor->momz = P_SignedRandom()*FRACUNIT/128;
|
||||
|
||||
P_UnsetThingPosition(actor);
|
||||
actor->x = actor->spawnpoint->x*FRACUNIT + P_SignedRandom()*FINECOSINE((actor->spawnpoint->angle*ANG1)>>ANGLETOFINESHIFT)/2;
|
||||
actor->y = actor->spawnpoint->y*FRACUNIT + P_SignedRandom()*FINESINE((actor->spawnpoint->angle*ANG1)>>ANGLETOFINESHIFT)/2;
|
||||
actor->z = actor->spawnpoint->z*FRACUNIT + P_SignedRandom()*FRACUNIT/2;
|
||||
P_SetThingPosition(actor);
|
||||
}
|
||||
|
|
11
src/p_mobj.c
11
src/p_mobj.c
|
@ -8359,6 +8359,8 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
case MT_GFZCHERRYTREE:
|
||||
case MT_LAMPPOST1:
|
||||
case MT_LAMPPOST2:
|
||||
case MT_DSZSTALAGMITE:
|
||||
case MT_DSZ2STALAGMITE:
|
||||
mobj->flags2 |= MF2_STANDONME;
|
||||
break;
|
||||
case MT_DETON:
|
||||
|
@ -10075,6 +10077,15 @@ domaceagain:
|
|||
case MT_TRAPGOYLELONG:
|
||||
if (mthing->angle >= 360)
|
||||
mobj->tics += 7*(mthing->angle / 360) + 1; // starting delay
|
||||
break;
|
||||
case MT_DSZSTALAGMITE:
|
||||
case MT_DSZ2STALAGMITE:
|
||||
case MT_KELP:
|
||||
if (mthing->options & MTF_OBJECTSPECIAL) { // make mobj twice as big as normal
|
||||
P_SetScale(mobj, 2*mobj->scale); // not 2*FRACUNIT in case of something like the old ERZ3 mode
|
||||
mobj->destscale = mobj->scale;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue