internal void StoreRecord() { RailStateRecord record = RailState.CreateRecord( this.Room.Tick, this.StateBase, this.outgoingStates.Latest); if (record != null) { this.outgoingStates.Store(record); } }
internal RailStateDelta ProduceDelta( Tick basisTick, IRailController destination) { RailStateRecord basis = null; if (basisTick.IsValid) { basis = this.outgoingStates.LatestAt(basisTick); } // Flags for special data modes bool includeControllerData = (destination == this.Controller); bool includeImmutableData = (basisTick.IsValid == false); return(RailState.CreateDelta( this.Id, this.StateBase, basis, includeControllerData, includeImmutableData, this.commandAck, this.RemovedTick)); }