From: Freddy Date: Sat, 10 Mar 2018 20:37:18 +0000 (+0100) Subject: teleport_dest: replace magic numbers X-Git-Tag: xonotic-v0.8.5~2176^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=461a4f06c097f2a53f19249b40e622c2a6411f20;p=xonotic%2Fxonotic-data.pk3dir.git teleport_dest: replace magic numbers --- 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();