Skip to content

Commit

Permalink
Fixes the "eternal return jump" bug (#2610)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaFire15 authored Mar 29, 2024
1 parent 202cd8b commit 2236a71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nsv13/code/modules/overmap/FTL/ftl_jump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@
var/datum/star_system/curr = SSstar_system.ships[src]["current_system"]
SEND_SIGNAL(src, COMSIG_SHIP_DEPARTED) // Let missions know we have left the system
curr.remove_ship(src)
var/speed = (curr.dist(target_system) / (ftl_drive.get_jump_speed() * 10)) //TODO: FTL drive speed upgrades.
var/drive_speed = ftl_drive.get_jump_speed()
if(drive_speed <= 0) //Assumption: If we got into this proc with speed 0, we want it to jump anyways, as it should be caught before otherwise. Using very slow speed in this case.
drive_speed = 1 //Div-by-0s are not fun.
var/speed = (curr.dist(target_system) / (drive_speed * 10)) //TODO: FTL drive speed upgrades.
SSstar_system.ships[src]["to_time"] = world.time + speed MINUTES
SEND_SIGNAL(src, COMSIG_FTL_STATE_CHANGE)
if(role == MAIN_OVERMAP) //Scuffed please fix
Expand Down

0 comments on commit 2236a71

Please sign in to comment.