File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
MLAPI/NetworkingManagerComponents/Binary Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -338,11 +338,22 @@ public void WriteDoublePacked(double value)
338
338
/// Convenience method that writes three non-varint floats from the vector to the stream
339
339
/// </summary>
340
340
/// <param name="vec">Vector to write</param>
341
- public void WriteVector3 ( Vector3 vec )
341
+ public void WriteVector3 ( Vector3 vector3 )
342
342
{
343
- WriteSingle ( vec . x ) ;
344
- WriteSingle ( vec . y ) ;
345
- WriteSingle ( vec . z ) ;
343
+ WriteSingle ( vector3 . x ) ;
344
+ WriteSingle ( vector3 . y ) ;
345
+ WriteSingle ( vector3 . z ) ;
346
+ }
347
+
348
+ /// <summary>
349
+ /// Convenience method that writes three varint floats from the vector to the stream
350
+ /// </summary>
351
+ /// <param name="vec">Vector to write</param>
352
+ public void WriteVector3Packed ( Vector3 vector3 )
353
+ {
354
+ WriteSinglePacked ( vector3 . x ) ;
355
+ WriteSinglePacked ( vector3 . y ) ;
356
+ WriteSinglePacked ( vector3 . z ) ;
346
357
}
347
358
348
359
/// <summary>
@@ -464,6 +475,12 @@ public double ReadDoublePacked()
464
475
/// <returns>The Vector3 read from the stream.</returns>
465
476
public Vector3 ReadVector3 ( ) => new Vector3 ( ReadSingle ( ) , ReadSingle ( ) , ReadSingle ( ) ) ;
466
477
478
+ /// <summary>
479
+ /// Read a Vector3 from the stream.
480
+ /// </summary>
481
+ /// <returns>The Vector3 read from the stream.</returns>
482
+ public Vector3 ReadVector3Packed ( ) => new Vector3 ( ReadSinglePacked ( ) , ReadSinglePacked ( ) , ReadSinglePacked ( ) ) ;
483
+
467
484
/// <summary>
468
485
/// Read a single-precision floating point value from the stream. The value is between (inclusive) the minValue and maxValue.
469
486
/// </summary>
You can’t perform that action at this time.
0 commit comments