<!--quoteo(post=333010:date=Jun 26 2009, 02:43 PM:name=Screwface)--><div class='quotetop'>QUOTE (Screwface @ Jun 26 2009, 02:43 PM) <a href="index.php?act=findpost&pid=333010"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I began the assassin quest and for now i reach the mission in port au prince with the stinkpot without any ctd. But when i want to equip the stinkpot, i have a crash by exiting the interface. Perhaps the refreshflags call in the InterfaceDoExit function also causes problems and should only be done when we exit the nationrelation interface (that's the only case where flag can be changed by interface i think)<!--QuoteEnd--></div><!--QuoteEEnd-->Do you think I didn't put it in INTERFACE\NationRelation.c file in the first place??? I did it, and it worked when I exited interface just after switching colors. However, when I tried to switch to other interface and then exit, all get messy (because it run refresh flags at the same time not one per frame).
As for surrender: what exactly do you want to do? TEXTURES\flagall.tga.tx & TEXTURES\flagfrt.tga.tx aren't used anymore and may be deleted. Surrendered ships should take white flag from appropriate flgfrt#.tga.tx file!!! Don't put white flag in to ship's flags, especially on the last position since then you'd get pennant and white flag simultaneusly.
Last time some ship surrendered with different flag mod I had a ctd (unrelated to this bugger) before I could see anything.
Code which swaps ships is unfinished because it removes existing models, puts new ones but I didn't find a way how to properly update their order yet, so ship models are loaded with deleted rigging environment (thus sails and flags, so forts and towns flags are also broken):<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// KK -->
if (FindLoadedLocation() >= 0 && locNumShips > 0) {
DeleteRiggingEnvironment();
LocLoadShips(&Locations[FindLoadedLocation()]);
}
// <-- KK<!--c2--></div><!--ec2-->
pirate_kk
As for surrender: what exactly do you want to do? TEXTURES\flagall.tga.tx & TEXTURES\flagfrt.tga.tx aren't used anymore and may be deleted. Surrendered ships should take white flag from appropriate flgfrt#.tga.tx file!!! Don't put white flag in to ship's flags, especially on the last position since then you'd get pennant and white flag simultaneusly.
Last time some ship surrendered with different flag mod I had a ctd (unrelated to this bugger) before I could see anything.
Code which swaps ships is unfinished because it removes existing models, puts new ones but I didn't find a way how to properly update their order yet, so ship models are loaded with deleted rigging environment (thus sails and flags, so forts and towns flags are also broken):<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// KK -->
if (FindLoadedLocation() >= 0 && locNumShips > 0) {
DeleteRiggingEnvironment();
LocLoadShips(&Locations[FindLoadedLocation()]);
}
// <-- KK<!--c2--></div><!--ec2-->
pirate_kk