Moderators IIYAMA Posted December 31, 2012 Moderators Share Posted December 31, 2012 Bandwidth wastage or bug fix? This is From the stealth source. (server) local objectlist = getElementsByType ( "object" ) for index, object in ipairs(objectlist) do if ( getElementData ( object, "renew" ) == "1" ) then--wtf? local x,y,z = getElementPosition( object ) local rx,ry,rz = getObjectRotation ( object ) local obid = getElementModel ( object ) destroyElement(object) local newobject = createObject ( obid, x, y, z, rx, ry, rz ) setElementData ( newobject, "renew", "1" )--wtf? end end Link to comment
uhm Posted January 3, 2013 Share Posted January 3, 2013 probably not all of the objects have to be renewed at the start of a round for example you would want to recreate breakable windows and boxes, but not houses or other structures Link to comment
Moderators IIYAMA Posted January 3, 2013 Author Moderators Share Posted January 3, 2013 yes, but it is still wasted of bandwidth. It is better to store it in a table. and the strange thing aboth all that the element data never will be set in the script except the element data already exist. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now