@@ -21,8 +21,6 @@ public class Spline : LevelObject, ITransformable, IRenderable
2121 [ Category ( "Attributes" ) , DisplayName ( "offset" ) ]
2222 public long offset { get ; set ; }
2323
24- static int CNT = 0 ;
25-
2624 /*public override Vector3 position
2725 {
2826 get { return _position; }
@@ -57,20 +55,20 @@ public Spline(int name, float[] vertexBuffer)
5755 }
5856 }
5957
60- public Spline ( byte [ ] splineBlock , int offset )
58+ public Spline ( byte [ ] splineBlock , int offset , int id )
6159 {
60+ this . id = id ;
6261 this . offset = offset ;
6362 LoadFromByteArray ( splineBlock , offset ) ;
6463 }
6564
66- public static LevelObject CreateFromByteArray ( byte [ ] splineBlock , int offset )
65+ public static LevelObject CreateFromByteArray ( byte [ ] splineBlock , int offset , int id )
6766 {
68- return new Spline ( splineBlock , offset ) ;
67+ return new Spline ( splineBlock , offset , id ) ;
6968 }
7069
7170 public void LoadFromByteArray ( byte [ ] splineBlock , int offset )
7271 {
73- id = CNT ;
7472 int count = ReadInt ( splineBlock , offset ) ;
7573 vertexBuffer = new float [ count * 3 ] ;
7674 wVals = new float [ count ] ;
@@ -86,8 +84,6 @@ public void LoadFromByteArray(byte[] splineBlock, int offset)
8684 {
8785 //_position = new Vector3(vertexBuffer[0], vertexBuffer[1], vertexBuffer[2]);
8886 }
89-
90- CNT ++ ;
9187 }
9288
9389 public override byte [ ] ToByteArray ( )
0 commit comments