From c9687bfd7bee7e0ad5ccab5914ed110c89435923 Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Fri, 22 Dec 2023 10:39:15 +0100 Subject: [PATCH] Use float[3] for MSG_ReadPos and MSG_WriteDir. vec3_t is not available in header, but float[3] matches better than float*. --- engine/common/common.c | 4 ++-- engine/common/common.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/common/common.c b/engine/common/common.c index cb096efd5..3fa2eb4f1 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -2423,7 +2423,7 @@ float MSG_ReadCoordFloat (void) return MSG_FromCoord(c, COORDTYPE_FLOAT_32); } -void MSG_ReadPos (vec3_t pos) +void MSG_ReadPos (float pos[3]) { pos[0] = MSG_ReadCoord(); pos[1] = MSG_ReadCoord(); @@ -2452,7 +2452,7 @@ void MSG_ReadDir (vec3_t dir) } #endif #if 1//def Q2SERVER -void MSG_WriteDir (sizebuf_t *sb, vec3_t dir) +void MSG_WriteDir (sizebuf_t *sb, float dir[3]) { int i, best; float d, bestd; diff --git a/engine/common/common.h b/engine/common/common.h index 3aa5aae13..12933d2c8 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -340,7 +340,7 @@ void MSG_WriteAngle16 (sizebuf_t *sb, float f); void MSGFTE_WriteDeltaUsercmd (sizebuf_t *buf, const short baseanges[3], const struct usercmd_s *from, const struct usercmd_s *cmd); void MSGQW_WriteDeltaUsercmd (sizebuf_t *sb, const struct usercmd_s *from, const struct usercmd_s *cmd); void MSGCL_WriteDeltaUsercmd (sizebuf_t *sb, const struct usercmd_s *from, const struct usercmd_s *cmd); -void MSG_WriteDir (sizebuf_t *sb, float *dir); +void MSG_WriteDir (sizebuf_t *sb, float dir[3]); extern qboolean msg_badread; // set if a read goes beyond end of message extern struct netprim_s msg_nullnetprim; @@ -371,7 +371,7 @@ char *MSG_ReadStringLine (void); float MSG_ReadCoord (void); float MSG_ReadCoordFloat (void); -void MSG_ReadPos (float *pos); +void MSG_ReadPos (float pos[3]); float MSG_ReadAngle (void); float MSG_ReadAngle16 (void); void MSGQW_ReadDeltaUsercmd (const struct usercmd_s *from, struct usercmd_s *cmd, int qwprotocolver);