X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_plats.qc;h=353e5e9feb4f4b64c146cb2f456c49181b13fa93;hp=3955442310817b537994f80d19d872ac6d65be3e;hb=369c2f884cacd69386e56ff0ab688178fc0e46c7;hpb=b7d32c1f333da63877913b30c861230243ce1213 diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 395544231..353e5e9fe 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -414,6 +414,10 @@ void spawnfunc_func_train() if (!self.speed) self.speed = 100; + if (!InitMovingBrushTrigger()) + return; + self.effects |= EF_LOWPRECISION; + if (self.spawnflags & 2) { self.platmovetype_turn = TRUE; @@ -422,10 +426,6 @@ void spawnfunc_func_train() else self.view_ofs = self.mins; - if (!InitMovingBrushTrigger()) - return; - self.effects |= EF_LOWPRECISION; - // wait for targets to spawn InitializeEntity(self, func_train_find, INITPRIO_SETLOCATION); @@ -528,7 +528,7 @@ void func_bobbing_controller_think() vector v; self.nextthink = time + 0.1; - if (!(self.owner.active == ACTIVE_ACTIVE)) + if(self.owner.active != ACTIVE_ACTIVE) { self.owner.velocity = '0 0 0'; return; @@ -745,7 +745,7 @@ void button_reset() void button_use() { - if (!(self.active == ACTIVE_ACTIVE)) + if(self.active != ACTIVE_ACTIVE) return; self.enemy = activator; @@ -788,7 +788,7 @@ When a button is touched, it moves some distance in the direction of it's angle, "speed" override the default 40 speed "wait" override the default 1 second wait (-1 = never return) "lip" override the default 4 pixel lip remaining at end of move -"health" if set, the button must be killed instead of touched. If set to -1, the button will fire on ANY attack, even damageless ones like the MinstaGib laser +"health" if set, the button must be killed instead of touched. If set to -1, the button will fire on ANY attack, even damageless ones like the InstaGib laser "sounds" 0) steam metal 1) wooden clunk @@ -1012,14 +1012,14 @@ float door_check_keys(void) { // some keys were used if (other.key_door_messagetime <= time) { play2(other, "misc/talk.wav"); - centerprint(other, strcat("You also need ", item_keys_keylist(door.itemkeys), "!")); + Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_DOOR_LOCKED_ALSONEED, item_keys_keylist(door.itemkeys)); other.key_door_messagetime = time + 2; } } else { // no keys were used if (other.key_door_messagetime <= time) { play2(other, "misc/talk.wav"); - centerprint(other, strcat("You need ", item_keys_keylist(door.itemkeys), "!")); + Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_DOOR_LOCKED_NEED, item_keys_keylist(door.itemkeys)); other.key_door_messagetime = time + 2; } } @@ -1027,7 +1027,7 @@ float door_check_keys(void) { if (door.itemkeys) { // door is now unlocked play2(other, "misc/talk.wav"); - centerprint(other, "Door unlocked!"); + Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_DOOR_UNLOCKED); return TRUE; } else return FALSE; @@ -1940,7 +1940,7 @@ void func_fourier_controller_think() float n, i, t; self.nextthink = time + 0.1; - if (!(self.owner.active == ACTIVE_ACTIVE)) + if(self.owner.active != ACTIVE_ACTIVE) { self.owner.velocity = '0 0 0'; return; @@ -2073,7 +2073,7 @@ void func_vectormamamam_controller_think() { self.nextthink = time + 0.1; - if (!(self.owner.active == ACTIVE_ACTIVE)) + if(self.owner.active != ACTIVE_ACTIVE) { self.owner.velocity = '0 0 0'; return;