From fdda1d061b9ed82fd7d07d7ce3890a6ea64d6309 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 12 Jan 2024 09:08:05 +1000 Subject: [PATCH] PRVM: fix some incorrect warning messages Closes https://gitlab.com/xonotic/darkplaces/-/issues/379 See 2322e173520b68ae6ca217024a47dfb8bbc12473 Signed-off-by: bones_was_here --- prvm_execprogram.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 99a89906..a386aa67 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -489,7 +489,7 @@ int i; if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites) { PRE_ERROR(); - VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); + VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); } } ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int); @@ -507,7 +507,7 @@ int i; if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites) { PRE_ERROR(); - VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); + VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); } } // refresh the garbage collection on the string - this guards @@ -531,7 +531,7 @@ int i; if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites) { PRE_ERROR(); - VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); + VM_Warning(prog, "Attempted assignment to world.%s (edictnum 0 field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name); } } ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int); @@ -557,7 +557,7 @@ int i; if (OPA->edict == 0 && !cached_allowworldwrites) { PRE_ERROR(); - prog->error_cmd("Forbidden assignment to NULL entity in %s", prog->name); + prog->error_cmd("Forbidden assignment to world (edictnum 0) in %s", prog->name); goto cleanup; } #endif -- 2.39.2