Quote: --- Original message by: Gamma927
When you attach an object to another, there is no collision for the attached object, hence why if you were to load a warthog into the cargo seat of a pelican, it'll clip through the ground if the pelican were positioned as such.
It's been a while since I last did a tl;dr post. Here goes.
Although it would clip through BSP, all other objects, including projectiles and players, can still collide with the attached objects.
I had completed scripts that were almost implemented in RPG_Beta6.2 for this exact feature, except one of the scripts needed for it just plain didn't seem to run for some unknown reason, so it was scrapped unfortunately. It sounds like it was an error in the script, I know, but I checked that script many times and I swear I couldn't find anything wrong with it.
Point is, I was able to get as far as implementing a system for checking the vehicles underneath the peli for any available ones and storing which one was available, which meant we implemented the biped attachment just fine.
Through testing the attached bipeds, yes, you have to do something about their collision, or else they could get shot at and collide with players trying to walk into peli.
I found that even getting rid of their collision model references wasn't enough. Although projectiles would pass through them and they would not be able to take damage, they would still collide with player bipeds when attached. But, checking 'passes through other bipeds' did the trick.
In addition, once attached, the only players that could get inside the peli were the ones on the same team as the bipeds. Apparently there's no difference between loading them in a seat and attaching them.
Had it not been for time, we would have made an invisible scenery to attach to the peli with 2 markers on it to attach the bipeds to the scenery rather than the peli, but that didn't happen either. My temporary fix was just to set the bipeds to the 'default' team so at least Red team could hop in.
Quote: --- Original message by: Niels
So in order to make it move better this script shoot refresh faster but still not to fast to lag anything? Is that even posible?
The laggy vehicle issue can't be helped. The reason is, like Gamma said, the script detaches the vehicles once re-attached so that the netcode recognizes them as separate objects and still sends their position to clients.
However, when a vehicle isn't occupied, the server only refreshes its position at certain intervals. Normally, this is all that's needed since forces that could throw around unoccupied vehicles are
usually synced. For example, a grenade explosion should sync, so on client and server the vehicle should get tossed very similarly so the server shouldn't have to update its position as much or at all.
But in the case of the peli pulling along a vehicle, there isn't even any force. To the clients, the vehicle is just changing position for no reason, so the server has to constantly update the position of the vehicle. Due to the fact that it only updates the position at set intervals, what you see as a client is a vehicle lagging to keep up with the peli.
The only 'fix' to this is to somehow decrease that interval, but that's probably hard-coded.