From df8af779ee7f555a4143d290c4ae2d375b83c1b5 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Sun, 21 Jul 2013 13:33:43 +0100 Subject: [PATCH] [Add] Star system can now set nebuale density and volatility. --- src/space.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/space.c b/src/space.c index 47e5d5f..873c6db 100644 --- a/src/space.c +++ b/src/space.c @@ -634,6 +634,14 @@ static StarSystem* system_parse(const xmlNodePtr parent) { flags |= FLAG_INTEFERENCESET; tmp->interference = xml_getFloat(cur)/100; } + else if(xml_isNode(cur, "nebulae")) { + ptrc = xml_nodeProp(cur, "volatility"); + if(ptrc != NULL) { /* Has volatility. */ + tmp->nebu_volatility = atof(ptrc); + free(ptrc); + } + tmp->nebu_density = xml_getFloat(cur); + } }while(xml_nextNode(cur)); } /* Load all the planets. */