Page 1 of 1

[Bug #514] Nation Allegiance Change

Posted: Thu Feb 28, 2013 12:12 am
by Hypnotoad
As outlined by tracker bug #514:
Bug #514

The problem was that certain variables were defined as local, they would go out of scope once the function ended, thus the next function wouldn't set nation or remove gil correctly.

The fix can be done in two ways:
- Using global variables
- Checking the nation + nation rank cost in both functions (avoiding global variables)

I have included both options. Its a option of which to pick. They both achieve the same end result, although one may be slightly better than the other.
nation_allegiance_fix_global.patch
Global variables.
(4.23 KiB) Downloaded 335 times
nation_allegiance_fix_alt.patch
Local variables.
(2.08 KiB) Downloaded 331 times

Re: [Bug #514] Nation Allegiance Change

Posted: Thu Feb 28, 2013 1:24 am
by kjLotus
globals is always a worse option

Re: [Bug #514] Nation Allegiance Change

Posted: Thu Feb 28, 2013 8:17 pm
by Metalfiiish