Another ice storm fix

This commit is contained in:
Bill 2022-03-23 15:09:32 -04:00
parent c9eb37f4c2
commit 7aa2ec036a
4 changed files with 6 additions and 6 deletions

View File

@ -1964,7 +1964,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
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);

View File

@ -7,7 +7,7 @@ export class ObjectDataUpdateMessage extends RoomObjectUpdateMessage
private _data: IObjectData;
private _extra: number;
constructor(state: number, data: IObjectData, extra: number = NaN)
constructor(state: number, data: IObjectData, extra: number = null)
{
super(null, null);
@ -30,4 +30,4 @@ export class ObjectDataUpdateMessage extends RoomObjectUpdateMessage
{
return this._extra;
}
}
}

View File

@ -49,8 +49,8 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic
{
if(!message) return;
const state = message.state / 1000;
const time = message.state % 1000;
const state = ~~(message.state / 1000);
const time = ~~(message.state % 1000);
if(!time)
{

View File

@ -254,7 +254,7 @@ export class FurnitureLogic extends MovingObjectLogic
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);
}