From daa7aceecf33d8a130384eec52d9b7939ea8270e Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Wed, 1 May 2024 17:43:04 +0200 Subject: [PATCH] Fixed sighttrace not properly passing entities This fixes the issue where some scripts (like e2l3's BattleHouse) expect sighttrace to ignore entities (fixes #202) --- code/fgame/scriptthread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/fgame/scriptthread.cpp b/code/fgame/scriptthread.cpp index 9cbd5bd9..fb0710ab 100644 --- a/code/fgame/scriptthread.cpp +++ b/code/fgame/scriptthread.cpp @@ -3778,7 +3778,7 @@ void ScriptThread::EventTrace(Event *ev) void ScriptThread::EventSightTrace(Event *ev) { - int content_mask = MASK_LINE; + int content_mask = MASK_SOLID; Vector start; Vector mins; Vector maxs; @@ -3794,7 +3794,7 @@ void ScriptThread::EventSightTrace(Event *ev) mins = ev->GetVector(4); case 3: if (ev->GetInteger(3)) { - content_mask = MASK_SOLID; + content_mask &= ~MASK_IGNORE_ENTS; } case 2: end = ev->GetVector(2);