Important fixes & mine lob speed reduction

This commit is contained in:
lachwright 2019-11-18 22:57:26 +08:00
parent 280d151d76
commit f786a8dbf6
2 changed files with 4 additions and 3 deletions

View File

@ -14656,7 +14656,7 @@ void A_DragonWing(mobj_t *actor)
fixed_t x, y;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_DragonSegment", actor))
if (LUA_CallAction("A_DragonWing", actor))
return;
#endif
@ -14697,5 +14697,6 @@ void A_DragonSegment(mobj_t *actor)
return;
#endif
actor->angle = hangle;
P_TeleportMove(actor, target->x + xdist, target->y + ydist, target->z + zdist);
}

View File

@ -9633,7 +9633,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->threshold == 0) // if the timer hits 0, look for a mine to drop!
{
mobj_t *segment = mobj;
while (segment->tracer != NULL && segment->tracer->state == &states[segment->tracer->info->spawnstate])
while (segment->tracer != NULL && !P_MobjWasRemoved(segment->tracer) && segment->tracer->state == &states[segment->tracer->info->spawnstate])
{
segment = segment->tracer;
}
@ -9641,7 +9641,7 @@ void P_MobjThinker(mobj_t *mobj)
{
mobj_t *mine = P_SpawnMobjFromMobj(segment, 0, 0, 0, segment->info->painchance);
mine->angle = segment->angle;
P_InstaThrust(mine, mobj->angle, P_AproxDistance(mobj->momx, mobj->momy));
P_InstaThrust(mine, mobj->angle, P_AproxDistance(mobj->momx, mobj->momy) >> 1);
P_SetObjectMomZ(mine, -2*FRACUNIT, true);
S_StartSound(mine, mine->info->seesound);
P_SetMobjState(segment, segment->info->raisestate);