X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fnades.qc;h=f9ddb8e99153d0f60b06cea63ba491589d35a3c8;hb=531350c716ebfae99647bf632c7bb29cf31c0d8c;hp=03b15525cf3b90547e41bc91b8cf0da1000258c6;hpb=ac5366add2c2d44bff2e03fc916b991eb009a10a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/nades.qc b/qcsrc/common/nades.qc index 03b15525c..f9ddb8e99 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) { 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,7 +34,7 @@ float healer_send(entity to, float sf) WriteByte(MSG_ENTITY, (self.ltime - time)*10.0+0.5); } - return TRUE; + return true; } #endif // SVQC @@ -43,8 +57,8 @@ void healer_setup() setmodel(self, "models/ctf/shield.md3"); 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; @@ -62,7 +76,7 @@ void healer_setup() void ent_healer() { - float sf = ReadByte(); + 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