]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Don't call setorigin if the origin hasn't changed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index e5363db7738fd9a79b5206fbcaa0262110350a49..48aa78bcfba7ee17974aeb71a8f2ebb0c882653a 100644 (file)
@@ -468,7 +468,9 @@ void Ice_Think(entity this)
                delete(this);
                return;
        }
-       setorigin(this, this.owner.origin - '0 0 16');
+       vector ice_org = this.owner.origin - '0 0 16';
+       if (this.origin != ice_org)
+               setorigin(this, ice_org);
        this.nextthink = time;
 }
 
@@ -494,6 +496,7 @@ void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint)
        entity ice = new(ice);
        ice.owner = targ;
        ice.scale = targ.scale;
+       // set_movetype(ice, MOVETYPE_FOLLOW) would rotate the ice model with the player
        setthink(ice, Ice_Think);
        ice.nextthink = time;
        ice.frame = floor(random() * 21); // ice model has 20 different looking frames