From: Mircea Kitsune Date: Fri, 28 Oct 2011 20:30:12 +0000 (+0300) Subject: Attempt to make loaded child objects attached. Code is buggy any currently breaks... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~66 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8913c34a04625fc7a05a138d1ac76e8569923a27;p=xonotic%2Fxonotic-data.pk3dir.git Attempt to make loaded child objects attached. Code is buggy any currently breaks storage, so switch to this commit only if you're ok with that --- diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index cad498b05..e1f57d9de 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -193,7 +193,7 @@ entity sandbox_ObjectPort_Load(string s, float database) { // load object properties float n, i; - entity e; + entity e, parent; for(;;) { @@ -218,6 +218,11 @@ entity sandbox_ObjectPort_Load(string s, float database) e.angles = stov(argv(12)); } + if(i > 0) // child object + sandbox_ObjectAttach_Set(e, parent, ""); + else // parent object + parent = e; + i += 1; if(i > n) break;