From 2c7259c50f2a857316003c94d8924cf2e4ef6de9 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Sat, 29 Oct 2011 16:35:24 +0300 Subject: [PATCH] Storage save: Persist all strings between quotation marks. This allows models, materials, and bones with spaces in their names to be persisted properly --- qcsrc/server/mutators/sandbox.qc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index c71cbc99f..f67886652 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -179,7 +179,7 @@ string sandbox_ObjectPort_Save(entity e, float database) else continue; - port_string[slot] = strcat(port_string[slot], head.model, " "); + port_string[slot] = strcat(port_string[slot], "\"", head.model, "\" "); port_string[slot] = strcat(port_string[slot], ftos(head.skin), " "); port_string[slot] = strcat(port_string[slot], ftos(head.alpha), " "); port_string[slot] = strcat(port_string[slot], sprintf("\"%.9v\"", head.colormod), " "); @@ -188,11 +188,11 @@ string sandbox_ObjectPort_Save(entity e, float database) port_string[slot] = strcat(port_string[slot], ftos(head.scale), " "); port_string[slot] = strcat(port_string[slot], ftos(head.movetype), " "); port_string[slot] = strcat(port_string[slot], ftos(head.damageforcescale), " "); - if(head.material) port_string[slot] = strcat(port_string[slot], head.material, " "); else port_string[slot] = strcat(port_string[slot], "- "); // none - gettaginfo(head, 0); if(gettaginfo_name) port_string[slot] = strcat(port_string[slot], gettaginfo_name, " "); else port_string[slot] = strcat(port_string[slot], "- "); // none + if(head.material) port_string[slot] = strcat(port_string[slot], "\"", head.material, "\" "); else port_string[slot] = strcat(port_string[slot], "- "); // none + gettaginfo(head, 0); if(gettaginfo_name) port_string[slot] = strcat(port_string[slot], "\"", gettaginfo_name, "\" "); else port_string[slot] = strcat(port_string[slot], "- "); // none if(database) { - if(head.crypto_idfp) port_string[slot] = strcat(port_string[slot], head.crypto_idfp, " "); else port_string[slot] = strcat(port_string[slot], "- "); // none + if(head.crypto_idfp) port_string[slot] = strcat(port_string[slot], "\"", head.crypto_idfp, "\" "); else port_string[slot] = strcat(port_string[slot], "- "); // none port_string[slot] = strcat(port_string[slot], sprintf("\"%.9v\"", head.origin), " "); port_string[slot] = strcat(port_string[slot], sprintf("\"%.9v\"", head.angles), " "); } -- 2.39.2