From: FruitieX Date: Tue, 16 Nov 2010 07:57:53 +0000 (+0200) Subject: don't use setattachment() on the ice, this way it won't rotate with the player X-Git-Tag: xonotic-v0.1.0preview~86^2~2^2~33 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b6f1aee5da39c2867fef52fef837b34497cd213a;p=xonotic%2Fxonotic-data.pk3dir.git don't use setattachment() on the ice, this way it won't rotate with the player --- diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 687c9a3f0..3939ef5b1 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -50,18 +50,26 @@ void freezetag_CheckWinner() next_round = time + 5; } +void freezetag_Ice_Think() +{ + setorigin(self, self.owner.origin - '0 0 16'); + self.nextthink = time; +} + void freezetag_Freeze() { self.freezetag_frozen = 1; - entity tag; - tag = spawn(); - tag.owner = self; - tag.classname = "freezetag_ice"; - tag.frame = floor(random() * 21); // ice model has 20 different looking frames - setmodel(tag, "models/ice/ice.md3"); + entity ice; + ice = spawn(); + ice.owner = self; + ice.classname = "freezetag_ice"; + ice.think = freezetag_Ice_Think; + ice.nextthink = time; + ice.frame = floor(random() * 21); // ice model has 20 different looking frames + setmodel(ice, "models/ice/ice.md3"); - setattachment(tag, self, ""); + //setattachment(ice, self, ""); self.movetype = MOVETYPE_NONE; @@ -75,10 +83,10 @@ void freezetag_Unfreeze() self.movetype = MOVETYPE_WALK; // remove the ice block - entity tag; - for(tag = world; (tag = find(tag, classname, "freezetag_ice")); ) if(tag.owner == self) + entity ice; + for(ice = world; (ice = find(ice, classname, "freezetag_ice")); ) if(ice.owner == self) { - remove(tag); + remove(ice); break; } }