public override Task Write(SourceBufferWriter buf, SourceDemo demo) { buf.WriteVectorBitCoord(Position); buf.WriteUBits(DecalTextureIndex, 9); if (EntityIndex.HasValue && ModelIndex.HasValue) { buf.WriteBoolean(true); buf.WriteUBits(EntityIndex.Value, 11); buf.WriteUBits(ModelIndex.Value, 11); } else { buf.WriteBoolean(false); } buf.WriteBoolean(LowPriority); return(Task.CompletedTask); }