#if defined(CSQC)
- #include "../../dpdefs/csprogsdefs.qh"
#include "../../client/defs.qh"
#include "all.qh"
#include "../buffs/all.qh"
#include "../movetypes/movetypes.qh"
#include "../../client/main.qh"
- #include "../../csqcmodellib/cl_model.qh"
+ #include "../../lib/csqcmodel/cl_model.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
#include "../constants.qh"
#include "../../server/constants.qh"
#include "../turrets/sv_turrets.qh"
#ifdef CSQC
.float ltime;
-void healer_draw()
-{SELFPARAM();
+void healer_draw(entity this)
+{
float dt = time - self.move_time;
self.move_time = time;
if(dt <= 0)
}
#endif // CSQC
-REGISTER_LINKED(Nade_Heal, bool isNew)
+REGISTER_NET_LINKED(Nade_Heal)
#ifdef CSQC
+NET_HANDLE(Nade_Heal, bool isNew)
{
+ Net_Accept(Nade_Heal);
int sf = ReadByte();
if (sf & 1) {
this.origin_x = ReadCoord();
// this.ltime = time + this.healer_lifetime;
healer_setup(this);
}
+ return true;
}
#endif
#ifdef SVQC
-float healer_send(entity to, int sf)
+bool healer_send(entity this, entity to, int sf)
{
- SELFPARAM();
- WriteByte(MSG_ENTITY, Linked_Nade_Heal.m_id);
- WriteByte(MSG_ENTITY, sf);
+ int channel = MSG_ENTITY;
+ WriteHeader(channel, Nade_Heal);
+ WriteByte(channel, sf);
if (sf & 1) {
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteCoord(channel, this.origin.x);
+ WriteCoord(channel, this.origin.y);
+ WriteCoord(channel, this.origin.z);
- WriteByte(MSG_ENTITY, this.healer_lifetime);
+ WriteByte(channel, this.healer_lifetime);
//WriteByte(MSG_ENTITY, this.ltime - time + 1);
- WriteShort(MSG_ENTITY, this.healer_radius);
+ WriteShort(channel, this.healer_radius);
// round time delta to a 1/10th of a second
- WriteByte(MSG_ENTITY, (this.ltime - time)*10.0+0.5);
+ WriteByte(channel, (this.ltime - time)*10.0+0.5);
}
return true;
}