mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
Another ice storm fix
This commit is contained in:
parent
c9eb37f4c2
commit
7aa2ec036a
@ -1964,7 +1964,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateRoomObjectFloor(roomId: number, objectId: number, location: IVector3D, direction: IVector3D, state: number, data: IObjectData, extra: number = NaN): boolean
|
public updateRoomObjectFloor(roomId: number, objectId: number, location: IVector3D, direction: IVector3D, state: number, data: IObjectData, extra: number = null): boolean
|
||||||
{
|
{
|
||||||
const object = this.getRoomObjectFloor(roomId, objectId);
|
const object = this.getRoomObjectFloor(roomId, objectId);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ export class ObjectDataUpdateMessage extends RoomObjectUpdateMessage
|
|||||||
private _data: IObjectData;
|
private _data: IObjectData;
|
||||||
private _extra: number;
|
private _extra: number;
|
||||||
|
|
||||||
constructor(state: number, data: IObjectData, extra: number = NaN)
|
constructor(state: number, data: IObjectData, extra: number = null)
|
||||||
{
|
{
|
||||||
super(null, null);
|
super(null, null);
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic
|
|||||||
{
|
{
|
||||||
if(!message) return;
|
if(!message) return;
|
||||||
|
|
||||||
const state = message.state / 1000;
|
const state = ~~(message.state / 1000);
|
||||||
const time = message.state % 1000;
|
const time = ~~(message.state % 1000);
|
||||||
|
|
||||||
if(!time)
|
if(!time)
|
||||||
{
|
{
|
||||||
|
@ -254,7 +254,7 @@ export class FurnitureLogic extends MovingObjectLogic
|
|||||||
|
|
||||||
if(message.data) message.data.writeRoomObjectModel(this.object.model);
|
if(message.data) message.data.writeRoomObjectModel(this.object.model);
|
||||||
|
|
||||||
if(!isNaN(message.extra)) this.object.model.setValue(RoomObjectVariable.FURNITURE_EXTRAS, message.extra.toString());
|
if(message.extra !== null) this.object.model.setValue(RoomObjectVariable.FURNITURE_EXTRAS, message.extra.toString());
|
||||||
|
|
||||||
this.object.model.setValue(RoomObjectVariable.FURNITURE_STATE_UPDATE_TIME, this.lastUpdateTime);
|
this.object.model.setValue(RoomObjectVariable.FURNITURE_STATE_UPDATE_TIME, this.lastUpdateTime);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user