Quote:
Originally Posted by syndrah
yes i noticed that too that the value ios being written constantly. ill change it around. i tried to store it as a temp value when i activate it, but couldnt get it to work right, the value kept getting ..."lost"...?
|
For example; initially set the tempnat to -1. When you activate the nation change, check if tempnat's -1 and if it is, read the nation value into tempnat. But like I said, that's a tad hackish.
Quote:
Originally Posted by syndrah
also kev can you calrify what you mean by poll?
|
There's an address which holds the current gamestate (pre-login, server / char selection, in-game, etc). I don't have the address nor the pattern to give you right now but I'm pretty sure it's mentioned somewhere around this forum. You simply check it's value periodically and use it to reinitialize tempnat every time it goes from char select to in-game.
Plus some nuances. Instead of int, bools or bool[] work better for simple toggle flags, even if just for clarity's sake. And toggling is more readable with spy = !spy instead of that 5 line if-else.