From 6f692cfa08fdfd11dfa6e2eea57c6a3bfedd50e9 Mon Sep 17 00:00:00 2001 From: Jackz Date: Thu, 18 Jul 2024 19:07:27 -0500 Subject: [PATCH] Fix bad CheckEntity code --- scripting/include/editor/editor.sp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripting/include/editor/editor.sp b/scripting/include/editor/editor.sp index 992d5cd..e49f546 100644 --- a/scripting/include/editor/editor.sp +++ b/scripting/include/editor/editor.sp @@ -156,12 +156,11 @@ enum struct EditorData { } bool CheckEntity() { - if(this.entity != INVALID_ENT_REFERENCE) { - if(this.entity == -1 && !IsValidEntity(this.entity)) { - PrintToChat(this.client, "\x04[Editor]\x01 Entity has vanished, editing cancelled."); - this.Reset(); - return false; - } + if(this.flags & Edit_WallCreator) return true; + if(this.entity == INVALID_ENT_REFERENCE || this.entity == -1 || !IsValidEntity(this.entity)) { + PrintToChat(this.client, "\x04[Editor]\x01 Entity has vanished, editing cancelled."); + this.Reset(); + return false; } return true; }