mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 10:31:42 +00:00
Merge branch 'EOL-3' into EOL
This commit is contained in:
commit
69114a5374
3 changed files with 56 additions and 12 deletions
10
src/info.c
10
src/info.c
|
@ -2139,7 +2139,7 @@ state_t states[NUMSTATES] =
|
|||
|
||||
{SPR_CBBS, 0, 5, {A_Look}, 768*FRACUNIT, 0, S_SUSPICIOUSFACESTABBERSTATUE_WAIT}, // S_SUSPICIOUSFACESTABBERSTATUE_WAIT
|
||||
{SPR_CBBS, 0, 23, {NULL}, 0, 0, S_SUSPICIOUSFACESTABBERSTATUE_BURST2}, // S_SUSPICIOUSFACESTABBERSTATUE_BURST1
|
||||
{SPR_NULL, 0, 40, {A_StatueBurst}, 0, S_FACESTABBER_CHARGE2, S_NULL}, // S_SUSPICIOUSFACESTABBERSTATUE_BURST2
|
||||
{SPR_NULL, 0, 40, {A_StatueBurst}, MT_FACESTABBER, S_FACESTABBER_CHARGE2, S_NULL}, // S_SUSPICIOUSFACESTABBERSTATUE_BURST2
|
||||
|
||||
// Big Tumbleweed
|
||||
{SPR_BTBL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BIGTUMBLEWEED
|
||||
|
@ -10048,7 +10048,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
1000, // spawnhealth
|
||||
S_YELLOWSPRINGBALL2, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
|
@ -10075,7 +10075,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
1000, // spawnhealth
|
||||
S_REDSPRINGBALL2, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
|
@ -10552,7 +10552,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SLIDEME|MF_SOLID|MF_PUSHABLE, // flags
|
||||
MT_FACESTABBER // raisestate
|
||||
MT_ROCKCRUMBLE3 // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BIGTUMBLEWEED
|
||||
|
@ -14304,7 +14304,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
4*FRACUNIT, // speed
|
||||
4*FRACUNIT, // radius
|
||||
4*FRACUNIT, // height
|
||||
0, // display offset
|
||||
1, // display offset
|
||||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
|
|
@ -1188,8 +1188,6 @@ void A_FaceStabRev(mobj_t *actor)
|
|||
return;
|
||||
}
|
||||
|
||||
if (actor->hnext)
|
||||
P_SetTarget(&actor->hnext, NULL);
|
||||
actor->extravalue1 = 0;
|
||||
|
||||
if (!actor->reactiontime)
|
||||
|
@ -1344,13 +1342,14 @@ void A_FaceStabMiss(mobj_t *actor)
|
|||
//
|
||||
// Description: For suspicious statues only...
|
||||
//
|
||||
// var1 = unused
|
||||
// var1 = object to create
|
||||
// var2 = effective nextstate for created object
|
||||
//
|
||||
void A_StatueBurst(mobj_t *actor)
|
||||
{
|
||||
//INT32 locvar1 = var1;
|
||||
INT32 locvar1 = var1;
|
||||
INT32 locvar2 = var2;
|
||||
mobjtype_t chunktype = (mobjtype_t)actor->info->raisestate;
|
||||
mobj_t *new;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
|
@ -1358,15 +1357,42 @@ void A_StatueBurst(mobj_t *actor)
|
|||
return;
|
||||
#endif
|
||||
|
||||
if (!(new = P_SpawnMobjFromMobj(actor, 0, 0, 0, (mobjtype_t)actor->info->raisestate)))
|
||||
if (!locvar1 || !(new = P_SpawnMobjFromMobj(actor, 0, 0, 0, locvar1)))
|
||||
return;
|
||||
|
||||
new->angle = actor->angle;
|
||||
new->target = actor->target;
|
||||
if (locvar2)
|
||||
P_SetMobjState(new, (statenum_t)locvar2);
|
||||
S_StartSound(new, new->info->attacksound);
|
||||
S_StopSound(actor);
|
||||
S_StartSound(actor, sfx_s3k96);
|
||||
|
||||
{
|
||||
fixed_t a, b;
|
||||
fixed_t c = (actor->height>>2) - FixedMul(actor->scale, mobjinfo[chunktype].height>>1);
|
||||
fixed_t v = 4<<FRACBITS;
|
||||
const fixed_t r = (actor->radius>>1);
|
||||
mobj_t *spawned;
|
||||
UINT8 i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
a = ((i & 1) ? r : (-r));
|
||||
b = ((i & 2) ? r : (-r));
|
||||
if (i == 4)
|
||||
{
|
||||
c += (actor->height>>1);
|
||||
v = 8<<FRACBITS;
|
||||
}
|
||||
|
||||
spawned = P_SpawnMobjFromMobj(actor, a, b, c, chunktype);
|
||||
|
||||
P_InstaThrust(spawned, R_PointToAngle2(0, 0, a, b), 8<<FRACBITS);
|
||||
P_SetObjectMomZ(spawned, v, false);
|
||||
|
||||
spawned->fuse = 3*TICRATE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function: A_JetJawRoam
|
||||
|
|
18
src/p_mobj.c
18
src/p_mobj.c
|
@ -6670,6 +6670,10 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_SetTarget(&mobj->target, NULL);
|
||||
if (mobj->tracer && P_MobjWasRemoved(mobj->tracer))
|
||||
P_SetTarget(&mobj->tracer, NULL);
|
||||
if (mobj->hnext && P_MobjWasRemoved(mobj->hnext))
|
||||
P_SetTarget(&mobj->hnext, NULL);
|
||||
if (mobj->hprev && P_MobjWasRemoved(mobj->hprev))
|
||||
P_SetTarget(&mobj->hprev, NULL);
|
||||
|
||||
mobj->eflags &= ~(MFE_PUSHED|MFE_SPRUNG);
|
||||
|
||||
|
@ -8612,6 +8616,20 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case MT_CANDLE:
|
||||
case MT_CANDLEPRICKET:
|
||||
{
|
||||
// Fake corona!!
|
||||
mobj_t *corona = P_SpawnMobjFromMobj(mobj, 0, 0, ((mobj->type == MT_CANDLE) ? 40 : 176)<<FRACBITS, MT_PARTICLE);
|
||||
//P_SetTarget(&corona->tracer, mobj);
|
||||
//corona->flags2 |= MF2_LINKDRAW; -- crash??????? can't debug right now...
|
||||
corona->sprite = SPR_FLAM;
|
||||
corona->frame = (FF_FULLBRIGHT|FF_TRANS90|12);
|
||||
corona->tics = -1;
|
||||
if (mobj->type == MT_CANDLE)
|
||||
P_SetScale(corona, (corona->destscale = mobj->scale*3));
|
||||
}
|
||||
break;
|
||||
case MT_JACKO1:
|
||||
case MT_JACKO2:
|
||||
case MT_JACKO3:
|
||||
|
|
Loading…
Reference in a new issue