Quote:
Originally Posted by HamletEagle
Can you please explain why this is overkill ? I mean, an automaton can't eat so many memory, does it ?
|
It makes the code much much less readable and provides not real benefit.
Actually, I just realized that it is actually completely wrong. Your function changes the rendering of a single player but you are changing the state of the command on a global level. So, if Player1 executes the command, you glow Player1. Then, if Player2 uses the command, they unglow Player2. Then, if Player1 uses the command again, they glow themselves again (but they are already glowing because they were never unglowed).
The original request merely needed to add two commands. One command to remove the original task and another to re-enable the original task (which can obviously be done with a single function for toggling a boolean). That's it. In addition, the for loop needs to be converted to using get_players().
__________________