From: Mircea Kitsune Date: Wed, 26 Oct 2011 21:27:45 +0000 (+0300) Subject: Make the clipboard work again, at the expense of not implementing it exactly how... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~135 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4b4e430d1e4836d38c69806c6d34691140505326;p=xonotic%2Fxonotic-data.pk3dir.git Make the clipboard work again, at the expense of not implementing it exactly how I wanted initially --- diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 39e01519e..7e18e042b 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -85,9 +85,10 @@ entity sandbox_SpawnObject() return e; } -void sandbox_Storage_Save(entity e, string s) +string sandbox_Storage_Save(entity e) { // save object properties + string s; s = strcat(e.model, " "); s = strcat(s, ftos(e.skin), " "); @@ -99,6 +100,8 @@ void sandbox_Storage_Save(entity e, string s) s = strcat(s, ftos(e.movetype), " "); s = strcat(s, ftos(e.damageforcescale), " "); s = strcat(s, ftos(e.material), " "); + + return s; } void sandbox_Storage_Load(entity e, string s) @@ -232,7 +235,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) { if(self.object_clipboard) strunzone(self.object_clipboard); - sandbox_Storage_Save(e, self.object_clipboard); + self.object_clipboard = sandbox_Storage_Save(e); self.object_clipboard = strzone(self.object_clipboard); print_to(self, "Object copied to clipboard");