File tree Expand file tree Collapse file tree 4 files changed +3
-23
lines changed Expand file tree Collapse file tree 4 files changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -278,9 +278,9 @@ func (p *Player) Velocity() r3.Vector {
278278 }
279279
280280 return r3.Vector {
281- X : p .Entity .PropertyValueMust ("localdata.m_vecVelocity[0]" ).Float64Val ( ),
282- Y : p .Entity .PropertyValueMust ("localdata.m_vecVelocity[1]" ).Float64Val ( ),
283- Z : p .Entity .PropertyValueMust ("localdata.m_vecVelocity[2]" ).Float64Val ( ),
281+ X : float64 ( p .Entity .PropertyValueMust ("localdata.m_vecVelocity[0]" ).FloatVal ),
282+ Y : float64 ( p .Entity .PropertyValueMust ("localdata.m_vecVelocity[1]" ).FloatVal ),
283+ Z : float64 ( p .Entity .PropertyValueMust ("localdata.m_vecVelocity[2]" ).FloatVal ),
284284 }
285285}
286286
Original file line number Diff line number Diff line change @@ -271,16 +271,6 @@ func (e *entity) OnPositionUpdate(h func(pos r3.Vector)) {
271271 }
272272}
273273
274- // BindPosition binds the entity's position to a pointer variable.
275- // The pointer is updated every time a position-relevant property is updated.
276- //
277- // See also OnPositionUpdate()
278- func (e * entity ) BindPosition (pos * r3.Vector ) {
279- e .OnPositionUpdate (func (newPos r3.Vector ) {
280- * pos = newPos
281- })
282- }
283-
284274// Returns a coordinate from a cell + offset
285275func coordFromCell (cell , cellWidth int , offset float64 ) float64 {
286276 return float64 (cell * cellWidth - maxCoordInt ) + offset
Original file line number Diff line number Diff line change @@ -44,11 +44,6 @@ type Entity interface {
4444 //
4545 // See also Position()
4646 OnPositionUpdate (h func (pos r3.Vector ))
47- // BindPosition binds the entity's position to a pointer variable.
48- // The pointer is updated every time a position-relevant property is updated.
49- //
50- // See also OnPositionUpdate()
51- BindPosition (pos * r3.Vector )
5247 // OnDestroy registers a function to be called on the entity's destruction.
5348 OnDestroy (delegate func ())
5449 // Destroy triggers all via OnDestroy() registered functions.
Original file line number Diff line number Diff line change @@ -85,11 +85,6 @@ func (v PropertyValue) BoolVal() bool {
8585 return v .IntVal > 0
8686}
8787
88- // Float64Val returns FloatVal converted from float32 to float64.
89- func (v PropertyValue ) Float64Val () float64 {
90- return float64 (v .FloatVal )
91- }
92-
9388type propertyDecoder struct {}
9489
9590func (propertyDecoder ) decodeProp (prop * property , reader * bit.BitReader ) {
You can’t perform that action at this time.
0 commit comments