Skip to content

Commit 0c6b5ea

Browse files
p2r3ThisAMJ
authored andcommitted
fix: ignore non-player portals in TickRules
1 parent 4040a0a commit 0c6b5ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Features/Speedrun/Rules.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,12 @@ void SpeedrunTimer::TickRules() {
513513
continue;
514514
}
515515

516+
auto fromPlayer = SE(portal)->field<CBaseHandle>("m_hFiredByPlayer");
517+
if (!fromPlayer) {
518+
portalPositions[slot][i] = {};
519+
continue;
520+
}
521+
516522
bool activated = SE(portal)->field<bool>("m_bActivated");
517523
if (!activated) {
518524
portalPositions[slot][i] = {};

0 commit comments

Comments
 (0)