Joe91 / fun-bots

A highly customizable and configurable bot mod for your Venice Unleashed Battlefield 3 server.
https://discord.gg/zNk3qCzk6x
236 stars 45 forks source link

Fix bots getting stuck between the base and first capture point #323

Closed tagener-noisu closed 7 months ago

tagener-noisu commented 8 months ago

I'm not sure why there's this check, but it makes bot stuck between the base and the first objective, but this change fixes that. Can you check if it's a correct fix?

Joe91 commented 8 months ago

Good point here, but I think we should not do it this way. This might solve some issues with some paths, but cause other issues with some other paths. I think Instead we should add some random-based behaviour in the section below. Maybe in the case of equal priority switch with a 70% change or something like that?

tagener-noisu commented 8 months ago

Yes. I noticed what was wrong this time. It all started with the previous fix I added. Since it had priority = 0, it didn't work sometimes. I reversed the previous commit and just bumped priorities on every branch by one. Looks good atm, but need some more testing. I'll play some more later.

Firjens commented 8 months ago

What is the difference between the old and new behavior with your change? Can you explain it a bit further?

tagener-noisu commented 7 months ago

I'm not sure what do you want to hear, it's a fix of the bot behaviour. There were some cases when the bots were getting stuck between two points and I fixed that. Well, I fixed it in the previous PR, but it didn't work as I exected in some cases, so this PR shoud fix it.

I tested it and it works good in my opinion.

Joe91 commented 7 months ago

Will try to merge it tomorrow. Sorry for the delay and thanks a lot for your contribution!