You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an example, arrows are Lua entities with speed, acceleration and chance to break stored inside. Across a server reboot while an arrow is flying only speed is retained, acceleration goes to 0,0,0 (the arrow goes straight) and the rest becomes nil (causing crashes). Is there a reason for it or any way to keep other (constant) values too?
The text was updated successfully, but these errors were encountered:
get_staticdata() and on_activate(static_data) are supposed to be used to store and set this information since not everything stored in an entity's definition is supposed to be preserved through block loads. If the velocity is stored automatically the acceleration should probably be stored too though.
Close this issue as “not a bug”?
Btw: Maybe the documentation needs to be clarified, it also took me some time to realize the importance of using the staticdata stuff.
As an example, arrows are Lua entities with speed, acceleration and chance to break stored inside. Across a server reboot while an arrow is flying only speed is retained, acceleration goes to 0,0,0 (the arrow goes straight) and the rest becomes nil (causing crashes). Is there a reason for it or any way to keep other (constant) values too?
The text was updated successfully, but these errors were encountered: