thevisad / DayZ-Private-master

Reality DayZ - replaced Bliss for DayZ servers
GNU General Public License v2.0
44 stars 84 forks source link

Vehicles - Maxlimit and minlimit not working #243

Closed dagg929 closed 11 years ago

dagg929 commented 11 years ago

Setting min limit to 1 and max to 1 you end up still getting like five of whatever on your server. Trying to only spawn 1 of each type of heli on my server and I am spawning vehicles via the reality builder.

seaweeduk commented 11 years ago

I can confirm this, I think something happened to this script back in 1.7.6.1. I used to run 1 helicopter and 1 plane on my server without problems, even with a large number of custom spawn points I never saw more than 1 spawn.

At one point I changed the folder I was running the spawn script from to be my actual reality files as opposed to an old folder which was out of date and I was deleting. After this I created 20 additional plane spawns on my server, I ran the spawn script with min 1 max 1 as usual and instead of the expected 1 plane 8 spawned. The only way I found to keep the numbers down was the % chance on each spawn point itself.

I looked at the SQL statement in the script and couldn't figure out the issue, if you run it manually the columns it returns look fine, originally I thought it must be something in my db I had messed up. When 1.7.7.1 came out I was going back to an almost vanilla database so I thought this would solve the issue, it is still occurring though I've had 2 UH1-H's spawn recently with a max of 1.....

thevisad commented 11 years ago

It was a change made to the vehicles perl statement. I believe a request was made to allow more vehicles on the servers and it was opened up.

seaweeduk commented 11 years ago

Thanks will see if I can trackdown the change

thevisad commented 11 years ago

Its a single line on line 116 of db_spawn_vehicles, remove the # in front of next unless ($count < $vehicle->{limit_max});

thevisad commented 11 years ago

I will be posting this back as fixed shortly.

thevisad commented 11 years ago

Pushed the fix back into the repo for this. It will now honor these settings.

seaweeduk commented 11 years ago

Thanks man :D

dagg929 commented 11 years ago

Appreciated, thevisad! Confirmed working here.