[Include] Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from)
#20

Well the array is not actually static, so I just something like this:

Code:
new
	Float:l = 0.0l
for (new i = 0; i != sizeof (MODELS_gColRadius); ++i)
{
	if (MODELS_gColRadius[i] > l) l = MODELS_gColRadius[i];
}
printf("%f", l);
That's not generally good practice in case the underlying structures change - the API (i.e. functions) will change with it.

I also just realised that you can do this:

Code:
stock bool:IsModelValid(objectmodel)
{
	if (0 <= objectmodel < sizeof (MODELS_gColRadius))
	{
		return MODELS_gColRadius[objectmodel] != 0.0;
	}
	return false;
}
However, I don't know if there are any valid objects with a radius of 0.0. I don't think there are as I'm pretty sure that even LOD objects, which have no collision, still have a bounding sphere.
Reply


Messages In This Thread
Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 04.04.2013, 14:24
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by vyper - 04.04.2013, 14:28
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 04.04.2013, 14:35
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by V1ceC1ty - 04.04.2013, 15:45
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by Scenario - 04.04.2013, 15:56
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 04.04.2013, 15:59
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by nickdodd25 - 04.04.2013, 16:20
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 04.04.2013, 16:29
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by IstuntmanI - 04.04.2013, 16:50
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by MP2 - 04.04.2013, 16:57
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by totar - 04.04.2013, 18:35
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by IstuntmanI - 04.04.2013, 18:40
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by V1ceC1ty - 04.04.2013, 18:46
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by MP2 - 04.04.2013, 18:50
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by V1ceC1ty - 04.04.2013, 18:59
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by AaronFarley - 04.04.2013, 19:17
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by Y_Less - 04.04.2013, 19:37
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by nickdodd25 - 04.04.2013, 19:57
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 05.04.2013, 03:11
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by Y_Less - 05.04.2013, 10:46
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 05.04.2013, 10:50
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by Excel™ - 05.04.2013, 17:08
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 05.04.2013, 17:47
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by Maxips2 - 08.04.2013, 19:17
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 09.04.2013, 06:49
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by Gamer_007 - 03.05.2013, 11:42
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by RajatPawar - 03.05.2013, 17:02
Re: Useful object streamer that streams objects realistically (the bigger the object, the farther it gets streamed from) - by MerryDeer - 13.10.2016, 12:28

Forum Jump:


Users browsing this thread: 3 Guest(s)