@@ -14442,6 +14442,8 @@ void ai_warp_out(object *objp)
14442
14442
// Goober5000 - make sure the flag is clear (if it was previously set)
14443
14443
aip->ai_flags.remove(AI::AI_Flags::Trying_unsuccessfully_to_warp);
14444
14444
14445
+ WarpParams* warp_params = &Warp_params[shipp->warpout_params_index];
14446
+
14445
14447
switch (aip->submode) {
14446
14448
case AIS_WARP_1:
14447
14449
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)
14450
14452
break;
14451
14453
case AIS_WARP_2: // Make sure won't collide with any object.
14452
14454
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 ))) {
14456
14458
aip->submode = AIS_WARP_3;
14457
14459
aip->submode_start_time = Missiontime;
14458
14460
@@ -14494,7 +14496,7 @@ void ai_warp_out(object *objp)
14494
14496
break;
14495
14497
case AIS_WARP_4: {
14496
14498
// 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) ) {
14498
14500
shipfx_warpout_start(objp);
14499
14501
aip->submode = AIS_WARP_5;
14500
14502
aip->submode_start_time = Missiontime;
0 commit comments