Jump to content

bandwidth wastage or bug fix


IIYAMA

Recommended Posts

  • Moderators

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
  • Moderators

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...