[Add] Clear the escorts on hyperspace (should prevent it from eventually bloating).

This commit is contained in:
Allanis 2013-12-31 04:48:55 +00:00
parent 584e97b0b7
commit 6322d7675d
3 changed files with 49 additions and 6 deletions

View File

@ -1,5 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Ships> <Ships>
<ship name="TestShip">
<GFX>lancelot</GFX>
<GUI>minimal</GUI>
<sound>engine</sound>
<class>civ medium</class>
<price>500000</price>
<fabricator>Nexus</fabricator>
<tech>7</tech>
<description>!Used for testing!</description>
<movement>
<thrust>220</thrust>
<turn>135</turn>
<speed>260</speed>
</movement>
<health>
<shield>340</shield>
<armour>300</armour>
<energy>380</energy>
<shield_regen>380</shield_regen>
<armour_regen>360</armour_regen>
<energy_regen>1000</energy_regen>
</health>
<characteristics>
<crew>4</crew>
<mass>95</mass>
<fuel>1000</fuel>
<cap_weapon>800</cap_weapon>
<cap_cargo>6000</cap_cargo>
</characteristics>
<outfits>
<outfit quantity="1">Lancelot Fighter Bay</outfit>
<outfit quantity="2">Lancelot Fighter</outfit>
<outfit quantity="2">Ripper MK2</outfit>
<outfit quantity="2">Ragnarok Beam</outfit>
<outfit quantity="2">Orion Beam</outfit>
<outfit quantity="1">Headhunter Launcher</outfit>
<outfit quantity="20">Headhunter</outfit>
</outfits>
</ship>
<ship name="Llama"> <ship name="Llama">
<GFX>llama</GFX> <GFX>llama</GFX>
<GUI>minimal</GUI> <GUI>minimal</GUI>
@ -238,11 +277,6 @@
<cap_cargo>10</cap_cargo> <cap_cargo>10</cap_cargo>
</characteristics> </characteristics>
<outfits> <outfits>
<outfit quantity="1">Lancelot Fighter Bay</outfit>
<outfit quantity="2">Lancelot Fighter</outfit>
<outfit quantity="2">Ripper MK2</outfit>
<outfit quantity="2">Ragnarok Beam</outfit>
<outfit quantity="2">Orion Beam</outfit>
<outfit quantity="1">Headhunter Launcher</outfit> <outfit quantity="1">Headhunter Launcher</outfit>
<outfit quantity="20">Headhunter</outfit> <outfit quantity="20">Headhunter</outfit>
</outfits> </outfits>

View File

@ -2,7 +2,7 @@
<Start> <Start>
<name>Dark Tides</name> <name>Dark Tides</name>
<player> <player>
<ship>Lancelot</ship> <ship>TestShip</ship>
<credits> <credits>
<low>10000</low> <low>10000</low>
<high>20000</high> <high>20000</high>

View File

@ -507,6 +507,15 @@ void space_init(const char* sysname) {
spfx_clear(); /* Remove of explosions. */ spfx_clear(); /* Remove of explosions. */
space_spawn = 1; /* Spawn is enabled by default. */ 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)) if((sysname == NULL) && (cur_system == NULL))
ERR("Cannot reinit system if there is no system previously loaded"); ERR("Cannot reinit system if there is no system previously loaded");
else if(sysname != NULL) { else if(sysname != NULL) {