Vehicles freezing clients
#1

Hi guys. I need some help with a problem I'm having regarding vehicles crashing clients.

I thought about posting this in Client Support, however it is not a problem with my client as all players are crashing at one point in particular. I have tried removing all/half of the vehicles and this has fixed the issue, however there weren't many vehicles to start with. Probably 150 or so streamed in at once?

As I said, it freezes the game for all players when they come within range of a certain point of Los Santos (Idlewood). At first I removed all vehicles and it was fine. I then added half of them back, no problem. When I added them all back, it started crashing again. No vehicle mods/components used.

Is there an actual limit on the client of how many vehicles can be streamed in at any given time? If so, is there any documentation on this limit? I'm sure I've seen many servers with more vehicle density than what I am attempting.

The exact point at which I crash is here, while driving forward:
https://i.imgur.com/uNsnWD2.jpg
https://i.imgur.com/XRdJAeM.jpg

This is a map of where vehicles would spawn if I hadn't disabled them:
https://i.imgur.com/Di6QRMN.png

Just to clarify, the game client is freezing, not crashing, and there is no crash dialog with opcodes or anything. I have to use task manager to quit the game.

Any ideas or suggestions would be great. Thanks.
Reply
#2

Propably too many vehicles in range or you have something in OnVehicleStreamedIn?
Reply
#3

EDIT: I thought I had resolved this but I have not.

I followed everything in this guide: http://forum.uifserver.net/index.php?topic=77308.0

It seems to have fixed the issue client-wise, however I still want to know what I can do in terms of server-side to prevent this from happening. Players aren't going to want to follow those steps just to be able to play.

I added some debug messages to OnVehicleStreamIn and it shows only 99 vehicles streamed in just before I crashed, whereas a few seconds before that there were 150+ vehicles streamed in, so it's not a limiting issue..

EDIT 2:
I have changed all my AddStaticVehicleEx functions to CreateVehicle and this seems to have finally fixed it. I say that, the last 8 times I think I've fixed it I was wrong, so I'll have to wait and see how it goes. From my understanding the difference between AddStaticVehicleEx and CreateVehicle is that AddStaticVehicleEx 'preloads' the vehicle models for the client or something like that. It's not documented anywhere I can find though..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)