From 8913c34a04625fc7a05a138d1ac76e8569923a27 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Fri, 28 Oct 2011 23:30:12 +0300 Subject: [PATCH] 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 --- qcsrc/server/mutators/sandbox.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.2