From 461a4f06c097f2a53f19249b40e622c2a6411f20 Mon Sep 17 00:00:00 2001 From: Freddy Date: Sat, 10 Mar 2018 21:37:18 +0100 Subject: [PATCH] teleport_dest: replace magic numbers --- qcsrc/common/triggers/misc/teleport_dest.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/triggers/misc/teleport_dest.qc b/qcsrc/common/triggers/misc/teleport_dest.qc index 40c7d46c4..012412678 100644 --- a/qcsrc/common/triggers/misc/teleport_dest.qc +++ b/qcsrc/common/triggers/misc/teleport_dest.qc @@ -3,12 +3,12 @@ REGISTER_NET_LINKED(ENT_CLIENT_TELEPORT_DEST) #ifdef SVQC -bool teleport_dest_send(entity this, entity to, int sf) +bool teleport_dest_send(entity this, entity to, int sendflags) { WriteHeader(MSG_ENTITY, ENT_CLIENT_TELEPORT_DEST); - WriteByte(MSG_ENTITY, sf); + WriteByte(MSG_ENTITY, sendflags); - if(sf & 1) + if(sendflags & SF_TRIGGER_INIT) { WriteByte(MSG_ENTITY, this.cnt); WriteCoord(MSG_ENTITY, this.speed); @@ -26,7 +26,7 @@ bool teleport_dest_send(entity this, entity to, int sf) void teleport_dest_link(entity this) { Net_LinkEntity(this, false, 0, teleport_dest_send); - this.SendFlags |= 1; // update + this.SendFlags |= SF_TRIGGER_INIT; } spawnfunc(info_teleport_destination) @@ -68,9 +68,9 @@ void teleport_dest_remove(entity this) NET_HANDLE(ENT_CLIENT_TELEPORT_DEST, bool isnew) { - int sf = ReadByte(); + int sendflags = ReadByte(); - if(sf & 1) + if(sendflags & SF_TRIGGER_INIT) { this.classname = "info_teleport_destination"; this.cnt = ReadByte(); -- 2.39.2