[Fix] Oops. Landing was based upon velocity alone, instead of distance and velocity.

This commit is contained in:
Allanis 2013-02-17 19:53:06 +00:00
parent 14e525078e
commit f941608fd8

View File

@ -866,7 +866,7 @@ void player_land(void) {
} }
Planet* planet = &cur_system->planets[planet_target]; Planet* planet = &cur_system->planets[planet_target];
if(planet_target >= 0) { if(planet_target >= 0) {
if(vect_dist(&player->solid->vel, &planet->pos) > planet->gfx_space->sw) { if(vect_dist(&player->solid->pos, &planet->pos) > planet->gfx_space->sw) {
player_message("You are too far away to land on %s", planet->name); player_message("You are too far away to land on %s", planet->name);
return; return;
} }