]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge from master to fix nades orb
authorLegendaryGuard <rootuser999@gmail.com>
Mon, 10 Jan 2022 01:49:49 +0000 (02:49 +0100)
committerLegendaryGuard <rootuser999@gmail.com>
Mon, 10 Jan 2022 01:49:49 +0000 (02:49 +0100)
qcsrc/common/mutators/mutator/nades/nades.qc

index 2ef7be708b1aea83776422abe7b781744f7ead14..75dd5aa8a83ed461416653eb3f2be26dfe4a1815 100644 (file)
@@ -606,9 +606,9 @@ void nade_entrap_touch(entity this, entity toucher)
        #endif
        }
 
-       if ( IS_REAL_CLIENT(toucher) && !IS_VEHICLE(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;
@@ -662,9 +662,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;
        }
@@ -691,9 +691,9 @@ void nade_monster_boom(entity this)
 
 void nade_veil_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_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))
@@ -1205,9 +1205,9 @@ void nade_ammo_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_brown = (IS_VEHICLE(toucher)) ? toucher.owner : toucher;
+               entity show_brown = (IS_VEHICLE(toucher) && toucher.owner) ? toucher.owner : toucher;
                STAT(AMMUNITIONING_ORB, show_brown) = time+0.1;
                STAT(AMMUNITIONING_ORB_ALPHA, show_brown) = 0.75 * (this.ltime - time) / this.orb_lifetime;
        }
@@ -1284,9 +1284,9 @@ void DarkBlinking(entity e);
 //copy of the special.qc function contents for DarkBlinking
 void nade_dark_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_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) || SAME_TEAM(toucher, this))