[sldev] Re: Reviewing/Fixing the Particle System
Argent Stonecutter
secret.argent at gmail.com
Fri May 25 12:49:58 PDT 2007
Problem #1, in LLViewerPartGroup:
mRegionp = gWorldPointer->getRegionFromPosAgent(center_agent);
llassert_always(center_agent.isFinite());
if (!mRegionp)
{
//llwarns << "No region at position, using agent region!" << llendl;
mRegionp = gAgent.getRegion();
}
This seems to be there to allow particles to be generated by objects
off-sim. This is useful: you can put user cloud generators off in the
void this way. It's not a problem, itself, but I thought "what if
this was changed to check if the particles were out of draw
distance". So I wondered if there was a mechanism to remove particle
sources that are out of draw distance.
Trying to track this down, it looks like the only place that the
particle sources get cleaned up is when a region object is destroyed.
The region object is destroyed when the client disconnects from the
simulator, in removeRegion(host).
When does the client disconnect from a simulator?
Can a client be connected to a simulator that is out of draw distance?
In addition, there's checks in the code to see if the region that is
being examined is connected to a defunct host, which implies that
there can be regions associated with hosts that have been restarted
in the world list... and if so, these regions would never be removed.
My suggestion is to try some checks on the region, and see if you can
find evidence of a "region leak", or particle systems associated with
regions that are out of draw distance.
More information about the SLDev
mailing list