From df01df98d6d2839cf4592c702c599a9c3ee3db2b Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 9 May 2019 01:50:37 +1000 Subject: [PATCH] If a vehicle is activating a checkpoint, count the owner as passing, fixes race with vehicles --- qcsrc/server/race.qc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 603b32a80..350872ce7 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -715,6 +715,8 @@ void checkpoint_passed(entity this, entity player) void checkpoint_touch(entity this, entity toucher) { EXACTTRIGGER_TOUCH(this, toucher); + if(IS_VEHICLE(toucher) && toucher.owner) + toucher = toucher.owner; checkpoint_passed(this, toucher); } @@ -723,6 +725,8 @@ void checkpoint_use(entity this, entity actor, entity trigger) if(trigger.classname == "info_player_deathmatch") // a spawn, a spawn return; + if(IS_VEHICLE(actor) && actor.owner) + actor = actor.owner; checkpoint_passed(this, actor); } -- 2.39.2