PDA

View Full Version : Object streaming not functioning properly


reckst4r
20/10/2013, 05:24 PM
Hi. I'm having some problems with object streaming. The streaming range/distance is very very short.. I've tried changing it, but it doesn't change ingame. I'm using incognito's streamer (latest version) and these are my streaming settings in server.cfg: onfoot_rate 100
incar_rate 100
stream_distance 300.0
stream_rate 1000

http://imgur.com/8RL51jK,QOVOKM2

***Niko***
20/10/2013, 05:41 PM
I use it like this
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 250.0
stream_rate 1500

also downlaod c++ notepad and find your object streamer include
and change this
(
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
to ->
native CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 700.0, Float:streamdistance = 700.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
)
also put this on ''OnGameModeInit''
Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 1000);

reckst4r
20/10/2013, 05:51 PM
I don't use CreateDynamicObjectEx, I use CreateDynamicObject

***Niko***
20/10/2013, 05:52 PM
I know,in include is like i gave you below.

reckst4r
20/10/2013, 05:56 PM
It still doesn't work

***Niko***
20/10/2013, 05:57 PM
Then something else is problem
Or you didn't do it good

reckst4r
20/10/2013, 06:48 PM
I did exactly what you told me to.

reckst4r
21/10/2013, 01:22 PM
Bump

reckst4r
21/10/2013, 05:26 PM
A little bump again..

Pottus
21/10/2013, 05:49 PM
I don't use CreateDynamicObjectEx, I use CreateDynamicObject

That is the problem, it's because you can't set the drawdistance with CreateDynamicObject() you need to use CreateDynamicObjectEx() OR manually set the stream distance after the object is created with CreateDynamicObject().

objectid = CreateDynamicObject();
Streamer_SetFloatData(STREAMER_TYPE_OBJECT , objectid , E_STREAMER_DRAW_DISTANCE, 300.0);

reckst4r
21/10/2013, 06:08 PM
objectid = CreateDynamicObject();
Streamer_SetFloatData(STREAMER_TYPE_OBJECT , objectid , E_STREAMER_DRAW_DISTANCE, 300.0);

That would set the draw distance of all objects created with CreateDynamicObject to 300.0, right?

Pottus
21/10/2013, 06:15 PM
No just the object you created so it needs to be done after each created object I would recommend CreateDynamicObjectEx() to save having to call that extra function but it wouldn't be a problem to do it this way.

reckst4r
21/10/2013, 06:18 PM
Well, I have atleast 5000 objects, so it would be a pain in the ass to do it like that. I'll try converting my objects to CreateDynamicObjectEx, and I'll get back to you afterwards.

Pottus
21/10/2013, 06:43 PM
It's easier than you think as a matter of fact here is a useful function.

stock AddDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, drawdistance = 300.0)
{
new oid;
oid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, oid, E_STREAMER_DRAW_DISTANCE, drawdistance);
return oid;
}

All you need to do now is change CreateDyanamicObject() with AddDynamicObject() there is a few reasons you might want to do this since it can be very useful for setting world, interior, playerid

reckst4r
21/10/2013, 06:56 PM
The objects aren't created now for some reason

reckst4r
23/10/2013, 01:56 PM
Bump