Jump to content

bandwidth wastage or bug fix


IIYAMA

Recommended Posts

  • Moderators
Posted

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 

Posted

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

  • Moderators
Posted

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.

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...