X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2FMain.qc;h=cea3273d385a5249596a8d362f26e35609e51d1c;hb=2c56e75249796d328ef73cd48fa3dc827c9ed16c;hp=e4fadc50ff3906e52edf2c3101f304e0fbe03654;hpb=02d2b7c6fea422d536b734893e079ab7f123c1c9;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index e4fadc50..cea3273d 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -657,17 +657,38 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) // -------------------------------------------------------------------------- // BEGIN OPTIONAL CSQC FUNCTIONS +void Ent_RemoveEntCS() +{ + entcs_receiver[self.sv_entnum] = world; +} void Ent_ReadEntCS() { + float sf; InterpolateOrigin_Undo(); self.classname = "entcs_receiver"; - self.sv_entnum = ReadByte() - 1; - self.origin_x = ReadShort(); - self.origin_y = ReadShort(); - self.origin_z = ReadShort(); - self.angles_y = ReadByte() * 360.0 / 256; - self.origin_z = self.angles_x = self.angles_z = 0; + sf = ReadByte(); + + if(sf & 1) + self.sv_entnum = ReadByte(); + if(sf & 2) + { + self.origin_x = ReadShort(); + self.origin_y = ReadShort(); + self.origin_z = ReadShort(); + } + if(sf & 4) + { + self.angles_y = ReadByte() * 360.0 / 256; + self.angles_x = self.angles_z = 0; + } + if(sf & 8) + self.healthvalue = ReadByte() * 10; + if(sf & 16) + self.armorvalue = ReadByte() * 10; + + entcs_receiver[self.sv_entnum] = self; + self.entremove = Ent_RemoveEntCS; InterpolateOrigin_Note(); } @@ -1035,7 +1056,7 @@ void Ent_Init() g_vore = ReadCoord(); g_balance_vore_swallow_limit = ReadCoord(); - armor_enabled = ReadByte(); + armor_max = ReadCoord(); if(!postinit) PostInit();