[Fix] Oops. Landing was based upon velocity alone, instead of distance and velocity.
This commit is contained in:
parent
14e525078e
commit
f941608fd8
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user