X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fsandbox%2Fsv_sandbox.qc;h=93dc602f0299df56c21597ea6cf966e951d2db78;hb=81062a39c99785039ceee2dcd187fed9352a08c5;hp=a2211fe75a2af294e229af70cafa403837c4a9df;hpb=393022c0e9b00481e68d1db786e96e4ffb7f37e0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/sandbox/sv_sandbox.qc b/qcsrc/common/mutators/mutator/sandbox/sv_sandbox.qc index a2211fe75..93dc602f0 100644 --- a/qcsrc/common/mutators/mutator/sandbox/sv_sandbox.qc +++ b/qcsrc/common/mutators/mutator/sandbox/sv_sandbox.qc @@ -75,14 +75,14 @@ void sandbox_ObjectFunction_Think(entity this) // since if the owning player disconnects, the object's owner should also be reset. // bots can't have objects - FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), LAMBDA( + FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { if(this.crypto_idfp == it.crypto_idfp) { this.realowner = it; break; } this.realowner = NULL; - )); + }); this.nextthink = time; @@ -209,7 +209,7 @@ void sandbox_ObjectRemove(entity e) sandbox_ObjectAttach_Remove(e); // detach child objects // if the object being removed has been selected for attachment by a player, unset it - FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.object_attach == e, LAMBDA(it.object_attach = NULL)); + FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.object_attach == e, { it.object_attach = NULL; }); if(e.material) { strunzone(e.material); e.material = string_null; } if(e.crypto_idfp) { strunzone(e.crypto_idfp); e.crypto_idfp = string_null; } @@ -407,7 +407,7 @@ void sandbox_Database_Load() if(file_get < 0) { if(autocvar_g_sandbox_info > 0) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded"); } else { @@ -432,7 +432,7 @@ void sandbox_Database_Load() } } if(autocvar_g_sandbox_info > 0) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name); } fclose(file_get); } @@ -524,7 +524,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand) _setmodel(e, argv(2)); if(autocvar_g_sandbox_info > 0) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " spawned an object at origin ^3", vtos(e.origin), "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " spawned an object at origin ^3", vtos(e.origin)); return true; // ---------------- COMMAND: OBJECT, REMOVE ---------------- @@ -533,7 +533,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand) if(e != NULL) { if(autocvar_g_sandbox_info > 0) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " removed an object at origin ^3", vtos(e.origin), "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " removed an object at origin ^3", vtos(e.origin)); sandbox_ObjectRemove(e); return true; } @@ -582,7 +582,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand) print_to(player, "^2SANDBOX - INFO: ^7Object pasted successfully"); if(autocvar_g_sandbox_info > 0) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " pasted an object at origin ^3", vtos(e.origin), "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " pasted an object at origin ^3", vtos(e.origin)); return true; } return true; @@ -617,7 +617,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand) player.object_attach = NULL; // object was attached, no longer keep it scheduled for attachment print_to(player, "^2SANDBOX - INFO: ^7Object attached successfully"); if(autocvar_g_sandbox_info > 1) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " attached objects at origin ^3", vtos(e.origin), "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " attached objects at origin ^3", vtos(e.origin)); return true; } print_to(player, "^1SANDBOX - WARNING: ^7Object could not be attached to the parent. Make sure you are facing an object that you have edit rights over"); @@ -630,7 +630,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand) sandbox_ObjectAttach_Remove(e); print_to(player, "^2SANDBOX - INFO: ^7Child objects detached successfully"); if(autocvar_g_sandbox_info > 1) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " detached objects at origin ^3", vtos(e.origin), "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " detached objects at origin ^3", vtos(e.origin)); return true; } print_to(player, "^1SANDBOX - WARNING: ^7Child objects could not be detached. Make sure you are facing an object that you have edit rights over"); @@ -721,7 +721,7 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand) e.message2 = strzone(strftime(true, "%d-%m-%Y %H:%M:%S")); if(autocvar_g_sandbox_info > 1) - LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n")); + LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin)); return true; }