From 4b4e430d1e4836d38c69806c6d34691140505326 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Thu, 27 Oct 2011 00:27:45 +0300 Subject: [PATCH] Make the clipboard work again, at the expense of not implementing it exactly how I wanted initially --- qcsrc/server/mutators/sandbox.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"); -- 2.39.2