Object CollX, CollY, CollZ position?
#4

Hey,

MicroD's the ModelSizes.inc I've never seen before but on brief and I mean just glancing here. It would do the job, however it doesn't seem the check a only the objects near the client. Therefore running this for every client every time they fie a single bullet could cause your server to lag due to the sheer processing volume. If you have an MP5 for example, and you fire 100 shots, that has to loop through the loop of 19902 objects each time. That's 1990200 checks for 100 shots.

This is another reason why I made this in plugin form as Mauzen said. Although this would be much more efficient as I could check, the player co-ordinates and then load the IPL file relative to where the player is along with the collision ID's from the the objects stated in the IPL file. This would make a loop of 19902 objects more like 30 or 40 checks at the most (I can't remember how many items are in the largest IPL file.).

EDIT: Just thought I'd clarify this more. Server objects could be defined to a pre-existing .IPL file or they could be loaded 24/7. This means that you would only check these server objects when they are near them, (where you have defined with:

pawn Код:
CollisionForObject(objectID, OPIONAL "IPLFileName");
Or even create your own IPL file to cover a smaller distance or a new Mapped area (Warning: Will actually create a .IPL to save memory).

pawn Код:
CreateIPL("Name");
AddToIPL("Name", ...);
The ...'s are encase I do release this officially and that anyone sees this and the paramaters are named differently. Just posted this edit... as a second guy added me asking how I'd detect server Objects as my post was "unclear". #END OF EDIT.

If you would like the plugin, you should contact me on Skype. However I cannot give you this today, as I deleted it thinking it was useless. Until others opened my eyes and told me it wasn't and they had many idea for it.

You would still however have to use some guess work, using the players camera vector to find the players line and sight and likely bullet path. As SA comes with minimal bullet physics, I don't know if this follows a path or hits anything near by, therefore finding it would be difficult to get accurate. This however would be apart of the "TraceLine" function which would be player camera vector to nearest collision.
Reply


Messages In This Thread
Object CollX, CollY, CollZ position? - by matyi10012 - 06.09.2014, 18:53
Re: Object CollX, CollY, CollZ position? - by MicroD - 06.09.2014, 19:12
Re: Object CollX, CollY, CollZ position? - by Mauzen - 06.09.2014, 19:15
Re: Object CollX, CollY, CollZ position? - by IceCube! - 06.09.2014, 19:31
Re: Object CollX, CollY, CollZ position? - by matyi10012 - 06.09.2014, 20:08

Forum Jump:


Users browsing this thread: 4 Guest(s)