1 .float healer_lifetime;
5 float healer_send(entity to, float sf)
7 WriteByte(MSG_ENTITY, ENT_CLIENT_HEALING_ORB);
8 WriteByte(MSG_ENTITY, sf);
12 WriteCoord(MSG_ENTITY, self.origin_x);
13 WriteCoord(MSG_ENTITY, self.origin_y);
14 WriteCoord(MSG_ENTITY, self.origin_z);
16 WriteByte(MSG_ENTITY, self.healer_lifetime);
17 //WriteByte(MSG_ENTITY, self.ltime - time + 1);
18 WriteShort(MSG_ENTITY, self.healer_radius);
19 // round time delta to a 1/10th of a second
20 WriteByte(MSG_ENTITY, (self.ltime - time)*10.0+0.5);
31 float dt = time - self.move_time;
32 self.move_time = time;
36 self.alpha = (self.ltime - time) / self.healer_lifetime;
37 self.scale = min((1 - self.alpha)*self.healer_lifetime*4,1)*self.healer_radius;
43 setmodel(self, "models/ctf/shield.md3");
45 setorigin(self, self.origin);
47 float model_radius = self.maxs_x;
48 vector size = '1 1 1' * self.healer_radius / 2;
49 setsize(self,-size,size);
50 self.healer_radius = self.healer_radius/model_radius*0.6;
52 self.draw = healer_draw;
54 self.movetype = MOVETYPE_NONE;
55 self.solid = SOLID_NOT;
56 self.drawmask = MASK_NORMAL;
58 self.avelocity = self.move_avelocity = '7 0 11';
59 self.colormod = '1 0 0';
60 self.renderflags |= RF_ADDITIVE;
65 float sf = ReadByte();
69 self.origin_x = ReadCoord();
70 self.origin_y = ReadCoord();
71 self.origin_z = ReadCoord();
72 setorigin(self, self.origin);
74 self.healer_lifetime = ReadByte();
75 self.healer_radius = ReadShort();
76 self.ltime = time + ReadByte()/10.0;
77 //self.ltime = time + self.healer_lifetime;