]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Merge branch 'master' into TimePath/deathtypes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 7914804b9df976219bf2b6112365fd0abc0151f8..c608c5b2c74a78325a2343556b1a679ff4137fd8 100644 (file)
@@ -24,6 +24,7 @@
 #include "bot/navigation.qh"
 
 #include "../common/vehicles/all.qh"
+#include "../common/triggers/teleporters.qh"
 
 #include "weapons/hitplot.qh"
 #include "weapons/weaponsystem.qh"
@@ -45,7 +46,7 @@
 
 #include "../common/monsters/sv_monsters.qh"
 
-#include "../warpzonelib/server.qh"
+#include "../lib/warpzone/server.qh"
 
 
 void send_CSQC_teamnagger() {
@@ -53,8 +54,8 @@ void send_CSQC_teamnagger() {
        WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER);
 }
 
-float ClientData_Send(entity to, int sf)
-{SELFPARAM();
+bool ClientData_Send(entity this, entity to, int sf)
+{
        if(to != self.owner)
        {
                error("wtf");
@@ -667,8 +668,8 @@ void PutClientInServer()
 .float ebouncefactor, ebouncestop; // electro's values
 // TODO do we need all these fields, or should we stop autodetecting runtime
 // changes and just have a console command to update this?
-float ClientInit_SendEntity(entity to, int sf)
-{SELFPARAM();
+bool ClientInit_SendEntity(entity this, entity to, int sf)
+{
        WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
        WriteByte(MSG_ENTITY, g_nexball_meter_period * 32);
        WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[0]));
@@ -811,7 +812,7 @@ void ClientKill_Now()
            if(!self.killindicator_teamchange)
            {
             self.vehicle_health = -1;
-            Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
+            Damage(self, self, self, 1 , DEATH_KILL.m_id, self.origin, '0 0 0');
            }
        }
 
@@ -824,7 +825,7 @@ void ClientKill_Now()
                ClientKill_Now_TeamChange();
 
        if(IS_PLAYER(self))
-               Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0');
+               Damage(self, self, self, 100000, DEATH_KILL.m_id, self.origin, '0 0 0');
 
        // now I am sure the player IS dead
 }
@@ -1216,7 +1217,7 @@ void ClientConnect (void)
        else
                stuffcmd(self, "set _teams_available 0\n");
 
-       attach_entcs();
+       attach_entcs(self);
 
        bot_relinkplayerlist();
 
@@ -1302,8 +1303,7 @@ void ClientDisconnect (void)
 
        bot_clientdisconnect();
 
-       if(self.entcs)
-               detach_entcs();
+       detach_entcs(self);
 
        if(autocvar_sv_eventlog)
                GameLogEcho(strcat(":part:", ftos(self.playerid)));
@@ -1658,7 +1658,7 @@ void player_regen (void)
        {
                if(self.vehicle)
                        vehicles_exit(VHEF_RELEASE);
-               self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
+               self.event_damage(self, self, 1, DEATH_ROT.m_id, self.origin, '0 0 0');
        }
 
        if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
@@ -2358,7 +2358,7 @@ void PlayerPreThink (void)
                {
                        if(self.vehicle)
                                vehicles_exit(VHEF_RELEASE);
-                       self.event_damage(self, self.frozen_by, 1, DEATH_NADE_ICE_FREEZE, self.origin, '0 0 0');
+                       self.event_damage(self, self.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, self.origin, '0 0 0');
                }
                else if ( self.revive_progress <= 0 )
                        Unfreeze(self);
@@ -2546,8 +2546,6 @@ void PlayerPreThink (void)
 
                FixPlayermodel();
 
-               GrapplingHookFrame();
-
                // LordHavoc: allow firing on move frames (sub-ticrate), this gives better timing on slow servers
                //if(frametime)
                {
@@ -2716,7 +2714,7 @@ void PlayerPostThink (void)
        */
 
        if(self.waypointsprite_attachedforcarrier)
-               WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
+               WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));
 
        playerdemo_write();