Dadido3 / D3bot

A very primitive AI for GMod bots designed to work with Jetboom's Zombie Survival gamemode.
40 stars 28 forks source link

Added FL_NOTARGET to meshing players, set zombies to ignore players meshing #38

Closed arthurgeron closed 5 years ago

arthurgeron commented 5 years ago

With the november update I thought it should be easier to make bots ignore meshing players, I had to manually check for the flag though, it works but if you do a hidemesh/editmesh with zombies currently alive they will attack you anyway, next time they spawn they will properly ignore/attack based on the flag checking, this last part I couldn't figure out.

Dadido3 commented 5 years ago

I reverted all the D3bot.GetValidPlayers(), as the same can be achieved by changing two lines. Also some of the player.GetAll() were for filtering traces and other non target related stuff, so they shouldn't be changed.

HANDLER.CanBeTgt and D3bot.RemoveObsDeadTgts are the functions that need to be modified, as they influence the target selection globally. Additionally HANDLER.CanBeTgt is called regularly, so zombies will stop to attack you immediately when you go into mesh edit mode now.

But thanks for the addition.

arthurgeron commented 5 years ago

No problem, thanks for fixing my errors.