Game Development Community

turning on and off usesnetwork

by Zeinad · in iTorque 2D · 06/10/2009 (9:28 am) · 1 replies

It has come to my attention that having usesnetwork be on hampers overall performance, is there a way to turn it on just at times that I need it, and turn it off again when I no longer need it?

Thanks.

#1
06/10/2009 (10:22 am)
No. All UsesNetwork does is shutdown the Net stuff on startup.

You could, however, make console functions that wrap Net::init(); and Net::shutdown(). Although, restarting the network stuff may not be the best thing, it could have some weird side-effects (or none at all, really I don't know, but I don't think the code was designed for that).