Bots check for vehicle repairs
Requested feature
It would be great to make the bots check their current vehicles health to repair. So for example: (only for land vehicles)
Thought it could be a cool idea idk
Use case
- Check every 10s if the bot is in a vehicle, and its a land vehicle and its health its 50% or below, and he is the driver AND he has a passenger THEN stop right in that place and wait a defined amount of seconds or if possible until the vehicles health has reached 100%.
- Almost same checks as before BUT if the bot is a passenger AND he is an Engineer he should get out and start repairing the vehicle to a 100%, once done, jump in the vehicle again.
Or / Also:
- Engineers check for near vehicles to repair (similar to how they lookup for revives but not quite the same)
I have checked the following...
- [x] I have read the contribution guidelines on reporting bugs and the code of conduct.
Linked the branch where I started to put some thoughts into this.
I remember I had the same idea. I actually did this, but I don't think the code still works. The most annoying thing was when bots exit the vehicles, they spawn on top of them and then they immediately start to repair them, still standing on top of them. If you're planning to do this, you need to solve this problem. Also there's an error with determining the maximum health of the vehicle. The bot saves the current vehicle health as the maximum value on entry, but there's no guarantie that it's actually true.
I also checked if any of the passengers has a repair tool and they existed the vehicle on 50% health and repaired them, while the driver continued fighting. But most of the time they just drove off, because they don't wait for the repair to complete.