]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/portals.qc
Merge remote branch 'origin/master' into samual/config_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / portals.qc
index a0f750b05beef72ba6ee7b2daa907d21dbc7b32e..bf50c9d3cada867c7d4d2034244a5a75a0d8caa4 100644 (file)
@@ -7,6 +7,7 @@
 .vector portal_safe_origin;
 .float portal_wants_to_vanish;
 .float portal_activatetime;
+.float savemodelindex;
 
 float PlayerEdgeDistance(entity p, vector v)
 {
@@ -394,14 +395,14 @@ void Portal_Remove(entity portal, float killed)
        if(killed)
        {
                fixedmakevectors(portal.mangle);
-               sound(portal, CHAN_PROJECTILE, "porto/explode.wav", VOL_BASE, ATTN_NORM);
+               sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTN_NORM);
                pointparticles(particleeffectnum("rocket_explode"), portal.origin + v_forward * 16, v_forward * 1024, 4);
                remove(portal);
        }
        else
        {
                Portal_MakeBrokenPortal(portal);
-               sound(portal, CHAN_PROJECTILE, "porto/expire.wav", VOL_BASE, ATTN_NORM);
+               sound(portal, CH_SHOTS, "porto/expire.wav", VOL_BASE, ATTN_NORM);
                SUB_SetFade(portal, time, 0.5);
        }
 }
@@ -479,7 +480,7 @@ float Portal_Customize()
                other = other.enemy;
        if(other == self.aiment)
        {
-               self.modelindex = self.modelindex_lod0;
+               self.modelindex = self.savemodelindex;
        }
        else if(IS_INDEPENDENT_PLAYER(other) || IS_INDEPENDENT_PLAYER(self.aiment))
        {
@@ -487,7 +488,7 @@ float Portal_Customize()
        }
        else
        {
-               self.modelindex = self.modelindex_lod0;
+               self.modelindex = self.savemodelindex;
        }
        return TRUE;
 }
@@ -617,7 +618,7 @@ entity Portal_Spawn(entity own, vector org, vector ang)
        portal.fade_time = time + autocvar_g_balance_portal_lifetime;
        portal.health = autocvar_g_balance_portal_health;
        setmodel(portal, "models/portal.md3");
-       portal.modelindex_lod0 = portal.modelindex;
+       portal.savemodelindex = portal.modelindex;
        portal.customizeentityforclient = Portal_Customize;
 
        if(!Portal_FindSafeOrigin(portal))