Fix error in chat

This commit is contained in:
Bill 2022-07-29 00:06:05 -04:00
parent 61d1c4b379
commit b6f03f6548

View File

@ -136,9 +136,7 @@ const useChatWidgetState = () =>
useRoomSessionManagerEvent<RoomSessionChatEvent>(RoomSessionChatEvent.CHAT_EVENT, event =>
{
const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, event.objectId, RoomObjectCategory.UNIT);
const objectLocation = roomObject ? roomObject.getLocation() : new Vector3d();
const bubbleLocation = GetRoomObjectScreenLocation(roomSession.roomId, roomObject?.id, RoomObjectCategory.UNIT);
const bubbleLocation = roomObject ? GetRoomObjectScreenLocation(roomSession.roomId, roomObject?.id, RoomObjectCategory.UNIT) : null;
const userData = roomObject ? roomSession.userDataManager.getUserDataByIndex(event.objectId) : new RoomUserData(-1);
let username = '';