diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-05-23 16:12:29 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-05-23 16:12:29 -0300 |
commit | 50110fb267f1c46d34febb65e7069a64da0ec2e8 (patch) | |
tree | 86062ade12d0c85a6993425642640ed2577c3d4d | |
parent | 68e50b3e266a21d0abebdd5af30da10e3b78549c (diff) | |
download | serverdata-50110fb267f1c46d34febb65e7069a64da0ec2e8.tar.gz serverdata-50110fb267f1c46d34febb65e7069a64da0ec2e8.tar.bz2 serverdata-50110fb267f1c46d34febb65e7069a64da0ec2e8.tar.xz serverdata-50110fb267f1c46d34febb65e7069a64da0ec2e8.zip |
Exception() - avoid self-error
-rw-r--r-- | npc/functions/main.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 8fc2accc1..2e3e03b0a 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -426,6 +426,15 @@ function script Exception { .@msg$=getarg(0); .@gf=getarg(1,RB_DEFAULT); + // Avoid self-errors + if (!playerattached()) { + if (.@gf & RB_DISPBOTTOM) + .@gf = .@gf ^ RB_DISPBOTTOM; + if (.@gf & RB_SPEECH) + .@gf = .@gf ^ RB_SPEECH; + } + + // Main protocols if (.@gf & RB_DISPBOTTOM) dispbottom("ERROR: "+.@msg$); |