From b6f1aee5da39c2867fef52fef837b34497cd213a Mon Sep 17 00:00:00 2001 From: FruitieX Date: Tue, 16 Nov 2010 09:57:53 +0200 Subject: [PATCH] don't use setattachment() on the ice, this way it won't rotate with the player --- qcsrc/server/mutators/gamemode_freezetag.qc | 28 +++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) 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; } } -- 2.39.2