From 6322d7675d4842774fff62412e218baf5d515ac0 Mon Sep 17 00:00:00 2001 From: Allanis Date: Tue, 31 Dec 2013 04:48:55 +0000 Subject: [PATCH] [Add] Clear the escorts on hyperspace (should prevent it from eventually bloating). --- dat/ship.xml | 44 +++++++++++++++++++++++++++++++++++++++----- dat/start.xml | 2 +- src/space.c | 9 +++++++++ 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/dat/ship.xml b/dat/ship.xml index b4ba099..28bbe72 100644 --- a/dat/ship.xml +++ b/dat/ship.xml @@ -1,5 +1,44 @@ + + lancelot + minimal + engine + civ medium + 500000 + Nexus + 7 + !Used for testing! + + 220 + 135 + 260 + + + 340 + 300 + 380 + 380 + 360 + 1000 + + + 4 + 95 + 1000 + 800 + 6000 + + + Lancelot Fighter Bay + Lancelot Fighter + Ripper MK2 + Ragnarok Beam + Orion Beam + Headhunter Launcher + Headhunter + + llama minimal @@ -238,11 +277,6 @@ 10 - Lancelot Fighter Bay - Lancelot Fighter - Ripper MK2 - Ragnarok Beam - Orion Beam Headhunter Launcher Headhunter diff --git a/dat/start.xml b/dat/start.xml index a44543e..489ee49 100644 --- a/dat/start.xml +++ b/dat/start.xml @@ -2,7 +2,7 @@ Dark Tides - Lancelot + TestShip 10000 20000 diff --git a/src/space.c b/src/space.c index a5dbb72..17161db 100644 --- a/src/space.c +++ b/src/space.c @@ -507,6 +507,15 @@ void space_init(const char* sysname) { spfx_clear(); /* Remove of explosions. */ space_spawn = 1; /* Spawn is enabled by default. */ + /* Clear player escorts since they don't automatically follow. */ + if(player) { + player->escorts = 0; + if(player->escorts) { + free(player->escorts); + player->escorts = NULL; + } + } + if((sysname == NULL) && (cur_system == NULL)) ERR("Cannot reinit system if there is no system previously loaded"); else if(sysname != NULL) {