You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
Merge remote-tracking branch 'origin/main'
# Conflicts: # packages/communication/src/NitroMessages.ts
This commit is contained in:
@@ -17,6 +17,7 @@ export class RoomMessageHandler
|
||||
|
||||
private _currentRoomId: number = 0;
|
||||
private _ownUserId: number = 0;
|
||||
private _ownRoomIndex: number = -1;
|
||||
private _initialConnection: boolean = true;
|
||||
private _guideId: number = -1;
|
||||
private _requesterId: number = -1;
|
||||
@@ -635,6 +636,7 @@ export class RoomMessageHandler
|
||||
|
||||
if(user.webID === this._ownUserId)
|
||||
{
|
||||
this._ownRoomIndex = user.roomIndex;
|
||||
this._roomEngine.setRoomSessionOwnUser(this._currentRoomId, user.roomIndex);
|
||||
this._roomEngine.updateRoomObjectUserOwn(this._currentRoomId, user.roomIndex);
|
||||
}
|
||||
@@ -735,6 +737,17 @@ export class RoomMessageHandler
|
||||
this._roomEngine.updateRoomObjectUserLocation(this._currentRoomId, status.id, location, goal, status.canStandUp, height, direction, status.headDirection);
|
||||
this._roomEngine.updateRoomObjectUserFlatControl(this._currentRoomId, status.id, null);
|
||||
|
||||
// Save own user's position for reconnection
|
||||
if(status.id === this._ownRoomIndex)
|
||||
{
|
||||
try
|
||||
{
|
||||
sessionStorage.setItem('nitro.session.lastPosX', status.x.toString());
|
||||
sessionStorage.setItem('nitro.session.lastPosY', status.y.toString());
|
||||
}
|
||||
catch(e) { /* ignore */ }
|
||||
}
|
||||
|
||||
let isPosture = true;
|
||||
let postureUpdate = false;
|
||||
let postureType = RoomObjectVariable.STD;
|
||||
|
||||
@@ -25,6 +25,8 @@ export class FloorplanEditor
|
||||
|
||||
private _image: HTMLImageElement;
|
||||
|
||||
public onTilemapChange: (() => void) | null = null;
|
||||
|
||||
constructor()
|
||||
{
|
||||
const width = TILE_SIZE * MAX_NUM_TILE_PER_AXIS + 20;
|
||||
@@ -297,6 +299,8 @@ export class FloorplanEditor
|
||||
}
|
||||
|
||||
this.renderSquareSelectionPreview();
|
||||
|
||||
if(this.onTilemapChange) this.onTilemapChange();
|
||||
}
|
||||
|
||||
private renderSquareSelectionPreview(): void
|
||||
@@ -473,6 +477,7 @@ export class FloorplanEditor
|
||||
this._squareSelectStart = null;
|
||||
this._squareSelectEnd = null;
|
||||
this.clearCanvas();
|
||||
this.onTilemapChange = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user