mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-05 22:33:20 +00:00
Fix bad CheckEntity code
This commit is contained in:
parent
1afa946472
commit
6f692cfa08
1 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue