]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
teleport_dest: replace magic numbers
authorFreddy <schro.sb@gmail.com>
Sat, 10 Mar 2018 20:37:18 +0000 (21:37 +0100)
committerFreddy <schro.sb@gmail.com>
Sat, 10 Mar 2018 20:37:18 +0000 (21:37 +0100)
qcsrc/common/triggers/misc/teleport_dest.qc

index 40c7d46c42803ce65dc2411a5da2847d190791b0..012412678481c3d0fa16e1bcc8dce779ad74361b 100644 (file)
@@ -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();