I'm using ferret's auto-alltalk plugin to learn from, I want to make sure it actually works, and also make it print a message.
I think it gets really confused when you change a cvar, inside an function that is called from HookConVarChange on that same cvar. I made it print a message about it turning it on and off, and this is what I get when limit is reached:
Code:
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 0.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 1.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 0.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 1.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 0.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 1.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 0.
L 01/06/2008 - 12:50:49: [autoalltalk.smx] [SM] 2 players, setting alltalk to 1
Is that something that is SUPPOSED to work, or is that a no-no? I think the problem might be that it cant test the state of it properly with GetConVarBool until after the function is done, I'm not sure.