mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
fix mumble coordinate transmission
This commit is contained in:
parent
42b8b8ecec
commit
9b1a3387cb
1 changed files with 8 additions and 6 deletions
|
@ -111,6 +111,7 @@ int mumble_link(const char* name)
|
|||
}
|
||||
close(shmfd);
|
||||
#endif
|
||||
memset(lm, 0, sizeof(LinkedMem));
|
||||
mbstowcs(lm->name, name, sizeof(lm->name));
|
||||
|
||||
return 0;
|
||||
|
@ -127,12 +128,12 @@ void mumble_update_coordinates2(float fAvatarPosition[3], float fAvatarFront[3],
|
|||
if (!lm)
|
||||
return;
|
||||
|
||||
memcpy(lm->fAvatarPosition, fAvatarPosition, sizeof(fAvatarPosition));
|
||||
memcpy(lm->fAvatarFront, fAvatarFront, sizeof(fAvatarFront));
|
||||
memcpy(lm->fAvatarTop, fAvatarTop, sizeof(fAvatarTop));
|
||||
memcpy(lm->fCameraPosition, fCameraPosition, sizeof(fCameraPosition));
|
||||
memcpy(lm->fCameraFront, fCameraFront, sizeof(fCameraFront));
|
||||
memcpy(lm->fCameraTop, fCameraTop, sizeof(fCameraTop));
|
||||
memcpy(lm->fAvatarPosition, fAvatarPosition, sizeof(lm->fAvatarPosition));
|
||||
memcpy(lm->fAvatarFront, fAvatarFront, sizeof(lm->fAvatarFront));
|
||||
memcpy(lm->fAvatarTop, fAvatarTop, sizeof(lm->fAvatarTop));
|
||||
memcpy(lm->fCameraPosition, fCameraPosition, sizeof(lm->fCameraPosition));
|
||||
memcpy(lm->fCameraFront, fCameraFront, sizeof(lm->fCameraFront));
|
||||
memcpy(lm->fCameraTop, fCameraTop, sizeof(lm->fCameraTop));
|
||||
lm->uiVersion = 2;
|
||||
lm->uiTick = GetTickCount();
|
||||
}
|
||||
|
@ -151,6 +152,7 @@ void mumble_set_context(const unsigned char* context, size_t len)
|
|||
if (!lm)
|
||||
return;
|
||||
len = MIN(sizeof(lm->context), len);
|
||||
lm->context_len = len;
|
||||
memcpy(lm->context, context, len);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue