]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove trigger_init(), it's in the way and is mostly duplicating WarpZoneLib_ExactTri...
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 3 Feb 2023 03:00:05 +0000 (13:00 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 21 May 2023 14:34:09 +0000 (00:34 +1000)
qcsrc/common/mapobjects/func/ladder.qc
qcsrc/common/mapobjects/trigger/impulse.qc
qcsrc/common/mapobjects/trigger/jumppads.qc
qcsrc/common/mapobjects/trigger/swamp.qc
qcsrc/common/mapobjects/trigger/teleport.qc
qcsrc/common/mapobjects/triggers.qc

index 36f802f4ad6db241ad5ec55ec64abca32e0ca751..0d4e253f091ce3cb83788bb39cf95b78171dd45d 100644 (file)
@@ -64,7 +64,8 @@ void func_ladder_link(entity this)
 
 void func_ladder_init(entity this)
 {
-       trigger_init(this);
+       EXACTTRIGGER_INIT;
+       BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
        func_ladder_link(this);
        setthink(this, func_ladder_think);
        this.nextthink = time;
index 4306e2ff7b169db75f947e6e522ab534d00eba9f..8cafdfa38461b48c5d0219442d67cd2fced631ea 100644 (file)
@@ -174,8 +174,8 @@ void trigger_impulse_link(entity this)
 spawnfunc(trigger_impulse)
 {
        this.active = ACTIVE_ACTIVE;
-
-       trigger_init(this);
+       EXACTTRIGGER_INIT;
+       BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
 
        if(this.radius)
        {
index 4754213bf3dd6e37efd961219ed9e44cb66c91a2..0ff3ba0a99c58d05de97458666ba703825b9d998 100644 (file)
@@ -606,8 +606,8 @@ spawnfunc(trigger_push)
 {
        SetMovedir(this);
 
-       trigger_init(this);
-
+       EXACTTRIGGER_INIT;
+       BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
        this.active = ACTIVE_ACTIVE;
        this.use = trigger_push_use;
        settouch(this, trigger_push_touch);
index 3aa6134a9a3cef9cd8cf6cd57a0932c262e2729e..a54665962c975ea494677ac83c231c36f266a6bf 100644 (file)
@@ -69,7 +69,6 @@ spawnfunc(trigger_swamp)
        // Init stuff
        EXACTTRIGGER_INIT;
        this.active = ACTIVE_ACTIVE;
-       //trigger_init(this);
        setthink(this, swamp_think);
        this.nextthink = time;
 
index 0ac4559ccb4a80228ca88102ef1c5f1c833e11c9..b581db0617762dd13353dbe64cdc25028d9a58c9 100644 (file)
@@ -122,7 +122,6 @@ spawnfunc(trigger_teleport)
        this.angles = '0 0 0';
 
        this.active = ACTIVE_ACTIVE;
-       //trigger_init(this); // only for predicted triggers?
        EXACTTRIGGER_INIT;
        this.use = trigger_teleport_use;
 
index 39fa89c42fc6236a1d1b471908d2da86e52c6e5f..0f0f7f788e99d7445dbd7b41fe7ffb2c6d89fb29 100644 (file)
@@ -101,30 +101,6 @@ void generic_netlinked_legacy_use(entity this, entity actor, entity trigger)
        this.setactive(this, ACTIVE_TOGGLE);
 }
 
-bool autocvar_g_triggers_debug = true;
-
-void trigger_init(entity this)
-{
-       string m = this.model;
-       EXACTTRIGGER_INIT;
-       if(autocvar_g_triggers_debug)
-       {
-               if(m != "")
-               {
-                       precache_model(m);
-                       _setmodel(this, m); // no precision needed
-               }
-               setorigin(this, this.origin);
-               if(this.scale)
-                       setsize(this, this.mins * this.scale, this.maxs * this.scale);
-               else
-                       setsize(this, this.mins, this.maxs);
-       }
-
-       if(autocvar_g_triggers_debug)
-               BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
-}
-
 void trigger_link(entity this, bool(entity this, entity to, int sendflags) sendfunc)
 {
        setSendEntity(this, sendfunc);