From 5b11668fa4daa406b8f827a3e0ea9665b55dc09f Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Tue, 20 Feb 2018 18:54:08 +0100 Subject: [PATCH] kill nottargeted field --- qcsrc/common/triggers/trigger/heal.qc | 2 +- qcsrc/common/triggers/triggers.qh | 3 +-- qcsrc/server/miscfunctions.qh | 1 - qcsrc/server/race.qc | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/triggers/trigger/heal.qc b/qcsrc/common/triggers/trigger/heal.qc index f2345e8f5..0f5c69c77 100644 --- a/qcsrc/common/triggers/trigger/heal.qc +++ b/qcsrc/common/triggers/trigger/heal.qc @@ -13,7 +13,7 @@ void trigger_heal_touch(entity this, entity toucher) if (!IS_DEAD(toucher)) if (toucher.triggerhealtime < time) { - bool is_trigger = !boolean(!this.nottargeted && this.targetname != ""); + bool is_trigger = this.targetname == ""; if(is_trigger) EXACTTRIGGER_TOUCH(this, toucher); if(this.delay > 0) diff --git a/qcsrc/common/triggers/triggers.qh b/qcsrc/common/triggers/triggers.qh index 2b8274f4b..49e3cb5ef 100644 --- a/qcsrc/common/triggers/triggers.qh +++ b/qcsrc/common/triggers/triggers.qh @@ -14,8 +14,7 @@ const float SPAWNFLAG_NOTOUCH = 1; .float height; -.float nottargeted; -#define IFTARGETED if(!this.nottargeted && this.targetname != "") +#define IFTARGETED if(this.targetname != "") .float lip; diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 8a32b9b5b..5538a5744 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -29,7 +29,6 @@ float cvar_normal(string n) #define cvar_set_normal builtin_cvar_set .vector dropped_origin; -.float nottargeted; entity eliminatedPlayers; void EliminatedPlayers_Init(float(entity) isEliminated_func); diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 7f7f19b51..8804063dc 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -995,7 +995,7 @@ spawnfunc(target_checkpoint) // defrag entity defrag_ents = 1; // if this is targeted, then it probably isn't a trigger - bool is_trigger = !boolean(!this.nottargeted && this.targetname != ""); + bool is_trigger = this.targetname == ""; if(is_trigger) EXACTTRIGGER_INIT; -- 2.39.2