From: Mircea Kitsune Date: Sat, 29 Oct 2011 13:35:24 +0000 (+0300) Subject: Storage save: Persist all strings between quotation marks. This allows models, materi... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~48 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2c7259c50f2a857316003c94d8924cf2e4ef6de9;p=xonotic%2Fxonotic-data.pk3dir.git Storage save: Persist all strings between quotation marks. This allows models, materials, and bones with spaces in their names to be persisted properly --- 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), " "); }