Bugfix a Jawz crash Jeck got a few days ago.

Not menu-based, but I guess this branch is misc PLUS menu stuff, not just menu stuff based on sal-misc.
This commit is contained in:
toaster 2018-09-08 17:50:53 +01:00
parent e7b53c3c09
commit d0fdd09be5
2 changed files with 17 additions and 10 deletions

View file

@ -2170,16 +2170,23 @@ static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t angle
th->momx = FixedMul(finalspeed, FINECOSINE(an>>ANGLETOFINESHIFT)); th->momx = FixedMul(finalspeed, FINECOSINE(an>>ANGLETOFINESHIFT));
th->momy = FixedMul(finalspeed, FINESINE(an>>ANGLETOFINESHIFT)); th->momy = FixedMul(finalspeed, FINESINE(an>>ANGLETOFINESHIFT));
if (type == MT_ORBINAUT) switch (type)
{ {
if (source && source->player) case MT_ORBINAUT:
th->color = source->player->skincolor; if (source && source->player)
else th->color = source->player->skincolor;
th->color = SKINCOLOR_CLOUDY; else
} th->color = SKINCOLOR_CLOUDY;
else if (type == MT_JAWZ || type == MT_JAWZ_DUD) break;
{ case MT_JAWZ:
S_StartSound(th, th->info->activesound); if (source && source->player)
th->cvmem = source->player->skincolor;
else
th->cvmem = SKINCOLOR_RED;
//fallthrough
case MT_JAWZ_DUD:
S_StartSound(th, th->info->activesound);
break;
} }
x = x + P_ReturnThrustX(source, an, source->radius + th->radius); x = x + P_ReturnThrustX(source, an, source->radius + th->radius);

View file

@ -8182,7 +8182,7 @@ void A_JawzChase(mobj_t *actor)
ret = P_SpawnMobj(actor->tracer->x, actor->tracer->y, actor->tracer->z, MT_PLAYERRETICULE); ret = P_SpawnMobj(actor->tracer->x, actor->tracer->y, actor->tracer->z, MT_PLAYERRETICULE);
P_SetTarget(&ret->target, actor->tracer); P_SetTarget(&ret->target, actor->tracer);
ret->frame |= ((leveltime % 10) / 2) + 5; ret->frame |= ((leveltime % 10) / 2) + 5;
ret->color = actor->target->player->skincolor; ret->color = actor->cvmem;
P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), actor->info->speed); P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), actor->info->speed);
return; return;