]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/nades/nades.qc
Merge branch 'master' into terencehill/replicatevars_enhancements
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / nades / nades.qc
index 2869d4f220def17140853c61e13c6a5b368513a3..7a00bd686b5b122b4b481e42fced7119becc67ce 100644 (file)
@@ -590,9 +590,9 @@ void nade_entrap_touch(entity this, entity toucher)
        #endif
        }
 
-       if ( IS_REAL_CLIENT(toucher) || IS_VEHICLE(toucher) || IS_MONSTER(toucher) )
+       if ( IS_REAL_CLIENT(toucher) || (IS_VEHICLE(toucher) && toucher.owner) )
        {
-               entity show_tint = (IS_VEHICLE(toucher)) ? toucher.owner : toucher;
+               entity show_tint = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
                STAT(ENTRAP_ORB, show_tint) = time + 0.1;
 
                float tint_alpha = 0.75;
@@ -646,9 +646,9 @@ void nade_heal_touch(entity this, entity toucher)
 
        }
 
-       if ( IS_REAL_CLIENT(toucher) || IS_VEHICLE(toucher) )
+       if ( IS_REAL_CLIENT(toucher) || (IS_VEHICLE(toucher) && toucher.owner) )
        {
-               entity show_red = (IS_VEHICLE(toucher)) ? toucher.owner : toucher;
+               entity show_red = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
                STAT(HEALING_ORB, show_red) = time+0.1;
                STAT(HEALING_ORB_ALPHA, show_red) = 0.75 * (this.ltime - time) / this.orb_lifetime;
        }
@@ -675,9 +675,9 @@ void nade_monster_boom(entity this)
 
 void nade_veil_touch(entity this, entity toucher)
 {
-       if ( IS_REAL_CLIENT(toucher) || IS_VEHICLE(toucher) || IS_MONSTER(toucher) )
+       if ( IS_REAL_CLIENT(toucher) || (IS_VEHICLE(toucher) && toucher.owner) )
        {
-               entity show_tint = (IS_VEHICLE(toucher)) ? toucher.owner : toucher;
+               entity show_tint = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
 
                float tint_alpha = 0.75;
                if(SAME_TEAM(toucher, this.realowner))