From da20f5dec60594df2701e169b9438c1ee55c0607 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 17 Oct 2018 06:13:24 +1000 Subject: [PATCH] Skip some checks if checking sound_allowed on a null entity --- qcsrc/common/sounds/all.qc | 1 + 1 file changed, 1 insertion(+) diff --git a/qcsrc/common/sounds/all.qc b/qcsrc/common/sounds/all.qc index 328486d35..fcd4d9a45 100644 --- a/qcsrc/common/sounds/all.qc +++ b/qcsrc/common/sounds/all.qc @@ -8,6 +8,7 @@ bool autocvar_bot_sound_monopoly; .entity realowner; bool sound_allowed(int to, entity e) { + if(!e) return true; // save on a few checks for ( ; ; ) { if (e.classname == "body") e = e.enemy; -- 2.39.2