From 187e04e25e42b9d99bddcfcd3ea5ad892661ae09 Mon Sep 17 00:00:00 2001 From: In-line Date: Wed, 26 Apr 2017 19:36:13 +0400 Subject: [PATCH] Refactor calls (#445) Refactor NET_LagPacket calls Refactor R_StudioCalcBonePosition call --- rehlds/engine/net_ws.cpp | 10 +++++----- rehlds/engine/r_studio.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rehlds/engine/net_ws.cpp b/rehlds/engine/net_ws.cpp index b074077..cec2bfb 100644 --- a/rehlds/engine/net_ws.cpp +++ b/rehlds/engine/net_ws.cpp @@ -1023,14 +1023,14 @@ qboolean NET_QueuePacket(netsrc_t sock) if (ret == -1 || ret == MAX_UDP_PACKET) { - return NET_LagPacket(0, sock, 0, 0); + return NET_LagPacket(FALSE, sock, NULL, NULL); } NET_TransferRawData(&in_message, buf, ret); if (*(int32 *)in_message.data != NET_HEADER_FLAG_SPLITPACKET) { - return NET_LagPacket(1, sock, &in_from, &in_message); + return NET_LagPacket(TRUE, sock, &in_from, &in_message); } if (in_message.cursize < 9) @@ -1249,7 +1249,7 @@ qboolean NET_GetPacket(netsrc_t sock) NET_ThreadLock(); if (NET_GetLoopPacket(sock, &in_from, &in_message)) { - bret = NET_LagPacket(1, sock, &in_from, &in_message); + bret = NET_LagPacket(TRUE, sock, &in_from, &in_message); } else { @@ -1257,11 +1257,11 @@ qboolean NET_GetPacket(netsrc_t sock) { bret = NET_QueuePacket(sock); if (!bret) - bret = NET_LagPacket(0, sock, 0, 0); + bret = NET_LagPacket(FALSE, sock, NULL, NULL); } else { - bret = NET_LagPacket(0, sock, 0, 0); + bret = NET_LagPacket(TRUE, sock, NULL, NULL); } } diff --git a/rehlds/engine/r_studio.cpp b/rehlds/engine/r_studio.cpp index db5c48d..8719af6 100644 --- a/rehlds/engine/r_studio.cpp +++ b/rehlds/engine/r_studio.cpp @@ -1090,7 +1090,7 @@ int R_StudioComputeBounds(unsigned char *pBuffer, float *mins, float *maxs) for (int f = 0; f < num_frames; ++f) { vec3_t bonepos; - R_StudioCalcBonePosition(f, 0.0, &pbones[bone], panim, 0, bonepos); + R_StudioCalcBonePosition(f, 0.0, &pbones[bone], panim, NULL, bonepos); R_StudioBoundBone(bone_mins, bone_maxs, &bone_count, bonepos); } }