I just tested your method ashore and it seems to work as well as mine, but since your uses per-frame updates,
rather than millisecond updates like mine, it's not system-related and would certainly be better. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid="" border="0" alt="yes.gif" />
However, it still doesn't fix the inventory problem.
What if we REALLY limit the updating of flags to sea only? That'd solve the problem for sure: <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid="" border="0" alt="whippa.gif" /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> if( bSeaActive && !bAbordageStarted )
{
LayerFreeze("sea_realize",false);
LayerFreeze("sea_execute",false);
if(CheckAttribute(GetMainCharacter(),"setcolours")) // PB: Only update flags if needed
{
DeleteAttribute(GetMainCharacter(),"setcolours");
RefreshMc_n_companionsFlags(); // Screwface: Just refresh the player and companion flag
/* PB Method
SetShipFlag(GetMainCharacterIndex()); // Screwface: Just refresh the player flag
// PB: Refresh companion flags too -->
for(int i = 1; i <= 3; i++)
{
int iCharacterIndex = GetCompanionIndex(GetMainCharacter(),i);
PostEvent("RefreshCharFlag", i*50, "l", iCharacterIndex);
}
// PB: Refresh companion flags too <--
*/
}
}
else
{
LayerFreeze("realize",false);
LayerFreeze("execute",false);
}<!--c2--></div><!--ec2-->
rather than millisecond updates like mine, it's not system-related and would certainly be better. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid="" border="0" alt="yes.gif" />
However, it still doesn't fix the inventory problem.
What if we REALLY limit the updating of flags to sea only? That'd solve the problem for sure: <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid="" border="0" alt="whippa.gif" /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> if( bSeaActive && !bAbordageStarted )
{
LayerFreeze("sea_realize",false);
LayerFreeze("sea_execute",false);
if(CheckAttribute(GetMainCharacter(),"setcolours")) // PB: Only update flags if needed
{
DeleteAttribute(GetMainCharacter(),"setcolours");
RefreshMc_n_companionsFlags(); // Screwface: Just refresh the player and companion flag
/* PB Method
SetShipFlag(GetMainCharacterIndex()); // Screwface: Just refresh the player flag
// PB: Refresh companion flags too -->
for(int i = 1; i <= 3; i++)
{
int iCharacterIndex = GetCompanionIndex(GetMainCharacter(),i);
PostEvent("RefreshCharFlag", i*50, "l", iCharacterIndex);
}
// PB: Refresh companion flags too <--
*/
}
}
else
{
LayerFreeze("realize",false);
LayerFreeze("execute",false);
}<!--c2--></div><!--ec2-->