Networking entities stored inside tables
🌙 Lua•Updated 2 days ago•0 views
net.readEntity gives you the entity or nil via callback - you can't put entities inside writeTable. Either split into parallel arrays (one writeEntity stream + …
How to net an array of entities (inside data structures) when entity order isn't guaranteed
net.readEntity gives you the entity or nil via callback - you can't put entities inside writeTable. Either split into parallel arrays (one writeEntity stream + one writeTable) or use readEntity callbacks and check proj:isValid() since the callback can fire more than once / entity may arrive later.