mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Fix bugs (uninitialised memory the compiler didn't pick up, and not setting scale) I sleepily caused last night.
This commit is contained in:
parent
cb86ed7721
commit
364984ac12
2 changed files with 8 additions and 6 deletions
|
@ -1266,30 +1266,32 @@ void A_FaceStabHurl(mobj_t *actor)
|
|||
#define NUMSTEPS 3
|
||||
#define NUMGRADS 5
|
||||
#define MAXVAL (NUMSTEPS*NUMGRADS)
|
||||
SINT8 step = ++actor->extravalue1;
|
||||
SINT8 step = (++actor->extravalue1);
|
||||
fixed_t basesize = FRACUNIT/MAXVAL;
|
||||
mobj_t *hwork = actor;
|
||||
INT32 dist = 113;
|
||||
fixed_t xo = P_ReturnThrustX(actor, actor->angle, dist*basesize);
|
||||
fixed_t yo = P_ReturnThrustY(actor, actor->angle, dist*basesize);
|
||||
|
||||
while (step > 0)
|
||||
{
|
||||
if (!hwork->hnext)
|
||||
P_SetTarget(&hwork->hnext, P_SpawnMobjFromMobj(actor, 0, 0, 0, MT_FACESTABBERSPEAR));
|
||||
hwork = hwork->hnext;
|
||||
hwork->angle = actor->angle + ANGLE_90;
|
||||
hwork->destscale = FixedSqrt(basesize*step);
|
||||
hwork->destscale = FixedSqrt(step*basesize);
|
||||
P_SetScale(hwork, hwork->destscale);
|
||||
hwork->fuse = 2;
|
||||
P_TeleportMove(hwork, actor->x + xo*(15-step), actor->y + yo*(15-step), actor->z + (actor->height - hwork->height)/2 + (P_MobjFlip(actor)*(8<<FRACBITS)));
|
||||
step -= NUMGRADS;
|
||||
}
|
||||
|
||||
if ((step % 5) == 0)
|
||||
P_SharpDust(actor, MT_SPINDUST, actor->angle);
|
||||
|
||||
if (actor->extravalue1 >= MAXVAL)
|
||||
actor->extravalue1 -= NUMGRADS;
|
||||
|
||||
if ((step % 5) == 0)
|
||||
P_SharpDust(actor, MT_SPINDUST, actor->angle);
|
||||
|
||||
P_FaceStabFlume(actor);
|
||||
return;
|
||||
#undef MAXVAL
|
||||
|
|
|
@ -9953,7 +9953,7 @@ void P_SpawnMapThing(mapthing_t *mthing)
|
|||
fixed_t mlength, mmaxlength, mlengthset, mspeed, mphase, myaw, mpitch, mminlength, mnumspokes, mpinch, mroll, mnumnospokes, mwidth, mwidthset, mmin, msound, radiusfactor, widthfactor;
|
||||
angle_t mspokeangle;
|
||||
mobjtype_t chainlink, macetype, firsttype, linktype;
|
||||
boolean mdosound, mdocenter, mchainlike;
|
||||
boolean mdosound, mdocenter, mchainlike = false;
|
||||
mobj_t *spawnee = NULL, *hprev = mobj;
|
||||
mobjflag_t mflagsapply;
|
||||
mobjflag2_t mflags2apply;
|
||||
|
|
Loading…
Reference in a new issue