Quote:
Originally Posted by stupok69
You are printing the message to 0, everyone, so that is why it says you got hit even though you did not get hit.
|
That's not even one of the problems. The message is only printed if it hits an immune player, and I'm the only immune player, so the message only appears if I get hit.
Quote:
Originally Posted by stupok69
But why isn't the bot getting damaged? I'm shooting in the dark, but I'm guessing the forward would be called as many times as there are players in the radius, so just ignore the one time its called for you.
|
This is how the grenade's radius damage works:
Code:
while ((pEntity = UTIL_FindEntityInSphere( pEntity, vecSrc, flRadius )) != NULL)
I assume by "ignore" you mean to supercede it (stop it from running). In that case, it will return NULL, and the while loop will stop, thus it will stop looking for other entities. This is basically what is happening now, even though it shouldn't be.
Quote:
Originally Posted by stupok69
Shouldn't you be able to extract the id of the player that is supposed to be hit without this line?
Code:
new hit = engfunc(EngFunc_FindEntityInSphere,start,origin,radius)
|
If you have another method, let me know. I can't get what it will return unless it's a post hook, in which case it's too late to stop. So, I just replicate this call, the return value will be exactly the same.
__________________