]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/misc/laser.qc
Add Read/WriteAngleVector macros to simplify the networking of angles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / misc / laser.qc
index 812dce76beff338b65307631231a084e418a6c04..77435e938b405cf5b013b07b56283f12383bb68f 100644 (file)
@@ -161,8 +161,7 @@ bool laser_SendEntity(entity this, entity to, float sendflags)
                }
                else
                {
-                       WriteAngle(MSG_ENTITY, this.mangle_x);
-                       WriteAngle(MSG_ENTITY, this.mangle_y);
+                       WriteAngleVector2D(MSG_ENTITY, this.mangle);
                }
        }
        if(sendflags & SF_LASER_UPDATE_ACTIVE)
@@ -388,8 +387,7 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew)
                }
                else
                {
-                       this.angles_x = ReadAngle();
-                       this.angles_y = ReadAngle();
+                       this.angles = ReadAngleVector2D();
                }
        }
        if(sendflags & SF_LASER_UPDATE_ACTIVE)