]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/triggers.qc
Merge branch 'master' into z411/bai-server
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / triggers.qc
index 39fa89c42fc6236a1d1b471908d2da86e52c6e5f..cfc1d6fac67f6222162c444e665f2dd31133b443 100644 (file)
@@ -9,7 +9,7 @@ bool isPushable(entity e)
                return false;
        if(e.iscreature)
                return true;
-       if (Item_IsLoot(e))
+       if (ITEM_IS_LOOT(e))
        {
                return true;
        }
@@ -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);
@@ -229,6 +205,8 @@ void trigger_common_read(entity this, bool withtarget)
                this.angles = '0 0 0';
 
        this.modelindex = ReadShort();
+       if (this.modelindex)
+               setmodelindex(this, this.modelindex);
        this.mins = ReadVector();
        this.maxs = ReadVector();
        this.scale = ReadByte() / 16;