@@ -14442,6 +14442,8 @@ void ai_warp_out(object *objp)
1444214442 // Goober5000 - make sure the flag is clear (if it was previously set)
1444314443 aip->ai_flags.remove(AI::AI_Flags::Trying_unsuccessfully_to_warp);
1444414444
14445+ WarpParams* warp_params = &Warp_params[shipp->warpout_params_index];
14446+
1444514447 switch (aip->submode) {
1444614448 case AIS_WARP_1:
1444714449 aip->force_warp_time = timestamp(10*1000); // Try to avoid a collision for up to ten seconds.
@@ -14450,9 +14452,9 @@ void ai_warp_out(object *objp)
1445014452 break;
1445114453 case AIS_WARP_2: // Make sure won't collide with any object.
1445214454 if (timestamp_elapsed(aip->force_warp_time)
14453- || (!collide_predict_large_ship(objp, objp->radius*2.0f + 100.0f )
14454- || (Warp_params[shipp->warpout_params_index]. warp_type == WT_HYPERSPACE
14455- && !collide_predict_large_ship(objp, 100000 .0f) ))) {
14455+ || (warp_params->warp_type == WT_SWEEPER )
14456+ || (warp_params-> warp_type == WT_IN_PLACE_ANIM)
14457+ || ( !collide_predict_large_ship(objp, objp->radius * 2 .0f + 100.0f ))) {
1445614458 aip->submode = AIS_WARP_3;
1445714459 aip->submode_start_time = Missiontime;
1445814460
@@ -14494,7 +14496,7 @@ void ai_warp_out(object *objp)
1449414496 break;
1449514497 case AIS_WARP_4: {
1449614498 // Only lets the ship warp after waiting for the warpout engage time
14497- if ( (Missiontime / 100) >= (aip->submode_start_time / 100 + Warp_params[shipp->warpout_params_index]. warpout_engage_time) ) {
14499+ if ( (Missiontime / 100) >= (aip->submode_start_time / 100 + warp_params-> warpout_engage_time) ) {
1449814500 shipfx_warpout_start(objp);
1449914501 aip->submode = AIS_WARP_5;
1450014502 aip->submode_start_time = Missiontime;
0 commit comments