mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-28 15:45:46 +03:00
Refactor calls (#445)
Refactor NET_LagPacket calls Refactor R_StudioCalcBonePosition call
This commit is contained in:
parent
4da6a09875
commit
187e04e25e
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user