X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fnades.qc;h=f361730ba16b29f5a9fe150e6272586e74afe0b3;hb=33cc9bcffae3eb87b65d706e98dce250667cc1d2;hp=03b15525cf3b90547e41bc91b8cf0da1000258c6;hpb=5c2f4b4147d182636eebc0c4454fc78f6561d56f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/nades.qc b/qcsrc/common/nades.qc index 03b15525c..f361730ba 100644 --- a/qcsrc/common/nades.qc +++ b/qcsrc/common/nades.qc @@ -1,17 +1,31 @@ -.float healer_lifetime; -.float healer_radius; +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qh" + #include "../client/defs.qh" + #include "nades.qh" + #include "buffs.qh" + #include "../common/movetypes/movetypes.qh" + #include "../client/main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qh" + #include "constants.qh" + #include "../server/constants.qh" + #include "../common/turrets/sv_turrets.qh" +#endif + #ifdef SVQC -float healer_send(entity to, float sf) -{ +float healer_send(entity to, int sf) +{SELFPARAM(); WriteByte(MSG_ENTITY, ENT_CLIENT_HEALING_ORB); WriteByte(MSG_ENTITY, sf); if(sf & 1) { - WriteCoord(MSG_ENTITY, self.origin_x); - WriteCoord(MSG_ENTITY, self.origin_y); - WriteCoord(MSG_ENTITY, self.origin_z); + WriteCoord(MSG_ENTITY, self.origin.x); + WriteCoord(MSG_ENTITY, self.origin.y); + WriteCoord(MSG_ENTITY, self.origin.z); WriteByte(MSG_ENTITY, self.healer_lifetime); //WriteByte(MSG_ENTITY, self.ltime - time + 1); @@ -20,14 +34,14 @@ float healer_send(entity to, float sf) WriteByte(MSG_ENTITY, (self.ltime - time)*10.0+0.5); } - return TRUE; + return true; } #endif // SVQC #ifdef CSQC .float ltime; void healer_draw() -{ +{SELFPARAM(); float dt = time - self.move_time; self.move_time = time; if(dt <= 0) @@ -39,12 +53,12 @@ void healer_draw() } void healer_setup() -{ - setmodel(self, "models/ctf/shield.md3"); +{SELFPARAM(); + setmodel(self, MDL_NADE_HEAL); setorigin(self, self.origin); - - float model_radius = self.maxs_x; + + float model_radius = self.maxs.x; vector size = '1 1 1' * self.healer_radius / 2; setsize(self,-size,size); self.healer_radius = self.healer_radius/model_radius*0.6; @@ -61,8 +75,8 @@ void healer_setup() } void ent_healer() -{ - float sf = ReadByte(); +{SELFPARAM(); + int sf = ReadByte(); if(sf & TNSF_SETUP) { @@ -79,4 +93,4 @@ void ent_healer() healer_setup(); } } -#endif // CSQC \ No newline at end of file +#endif // CSQC