Witam mam problem z ogrpg-gui dok?adnie z objects.lua kt?ry kraszuje gr?, przed kraszem w db3 pokazuje ze w skrypcie ogrpg-gui/objects.lua 36 not memory (czy jako? tak) Gra dostaje crash w randomowych miejsach ale co jaki? d?u?szy czas.
[lua]local element = "object"
local enabled = true
local streamdistance = 200
local function checkStreamIn()
if ( enabled ) then
local x, y, z = getElementPosition( getLocalPlayer() )
local playerdimension = getElementDimension ( getLocalPlayer() )
for key, value in pairs(getElementsByType(element)) do
local vx, vy, vz = getElementPosition(value)
local distx = x - vx
local disty = y - vy
if (distx < 0) then
distx = distx - distx - distx
end
if (disty < 0) then
disty = disty - disty - disty
end
if (distx < streamdistance) and (disty < streamdistance) then
-- Stream them in
streamInElement2( value )
else
-- Stream them out
streamOutElement2(value)
end
end
end
end
setTimer(checkStreamIn, 1500, 0)
local function isElementStreamedOut ( theElement )
return getElementDimension( theElement ) == 65256
end
function streamOutElement2( theElement )
if (getElementType(theElement) == element ) and not (isElementStreamedOut(theElement)) then
local currentDimension = getElementDimension( theElement )
setElementDimension(theElement, 65256)
setElementData(theElement, "streamer... |