]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hook.qc
General cleanup/optimize
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hook.qc
index 452189a1584c9cf60f91170e10c53c86365a39f0..f39e8eaa45d60944cd141001484ad97452931d58 100644 (file)
@@ -41,7 +41,7 @@ void Draw_GrapplingHook(entity this)
                self.teleport_time = 0;
        }
 
-       InterpolateOrigin_Do();
+       InterpolateOrigin_Do(this);
 
        int s = W_GetGunAlignment(world);
 
@@ -162,16 +162,16 @@ void Remove_GrapplingHook()
        sound (self, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
 }
 
-void Ent_ReadHook(float bIsNew, entity type)
-{SELFPARAM();
-       self.HookType = type;
+NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)
+{
+       self.HookType = NET_ENT_CLIENT_HOOK;
 
        int sf = ReadByte();
 
        self.HookSilent = (sf & 0x80);
        self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
 
-       InterpolateOrigin_Undo();
+       InterpolateOrigin_Undo(self);
 
        if(sf & 1)
        {
@@ -203,7 +203,7 @@ void Ent_ReadHook(float bIsNew, entity type)
                self.velocity_z = ReadCoord();
        }
 
-       InterpolateOrigin_Note();
+       InterpolateOrigin_Note(this);
 
        if(bIsNew || !self.teleport_time)
        {
@@ -225,6 +225,7 @@ void Ent_ReadHook(float bIsNew, entity type)
        }
 
        self.teleport_time = time + 10;
+       return true;
 }
 
 // TODO: hook: temporarily transform self.origin for drawing the model along warpzones!