05.04.2013, 10:46
Well the array is not actually static, so I just something like this:
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:
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.
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);
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; }