That is actual pajeet tier coding. They are essentially running a damage command every tick and then the player only gets damaged if they are in range, I'm assuming, this is like Unity asset flip tier coding level. They should be running a behavior tree or something that only attempts to damage the player when the attack has occurred and when the player is within range, if the player is out of range they should entirely skip the attack/damage stuff and tell the AI to do something else like move to the player, this is basic ass shit.
View attachment 5966683
I swear to god they better not have written the whole thing in visual script or Lua...
This is what happens when you don't hire people who are actually qualified for the job and just hire based on diversity. I wouldn't be surprised if a lot of other big games are coded this shittily, since there seems to be some belief in game dev circles that as long as it works its fine and you should ship it, which is used to excuse utter garbage like this. If you need to ship very soon and the only way to get something to work is a gross hack like this then fine, you need to ship, but coding an entire game like this is yandev tier bullshit and you should be fired.