From 74161ff223b2fac925966245701a5611185fc8ef Mon Sep 17 00:00:00 2001 From: Allanis Date: Sun, 10 Feb 2013 05:35:41 +0000 Subject: [PATCH] [Change] Adding a little more distance on ship start locations. --- src/space.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/space.c b/src/space.c index 7284ad1..7d65eeb 100644 --- a/src/space.c +++ b/src/space.c @@ -158,10 +158,14 @@ void space_init(const char* sysname) { vectnull(&vn); for(i = 0; i < cur_system->nfleets; i++) if(RNG(0,100) <= cur_system->fleets[i].chance) {// Check fleet. + // Simulate ships coming from hyperspace. vect_pset(&v, 2*RNG(MIN_HYPERSPACE_DIST/2, MIN_HYPERSPACE_DIST), RNG(0, 360)*M_PI/180.); + for(j = 0; j < cur_system->fleets[i].fleet->npilots; j++) if(RNG(0,100) <= cur_system->fleets[i].fleet->pilots[j].chance) { - vect_cadd(&v, RNG(-50, 50), RNG(-50, 50)); + // Other ships in the fleet should start split up. + vect_cadd(&v, RNG(50, 150) * (RNG(0,1) ? 1 : -1), + RNG(50, 150) * (RNG(0,1) ? 1 : -1)); pilot_create(cur_system->fleets[i].fleet->pilots[j].ship, cur_system->fleets[i].fleet->pilots[j].name, cur_system->fleets[i].fleet->faction,