I think i am about half way of fixing it, the main problem is with officers that died, most affected ofcourse are the fighters or dunno if you own 2 ships and the second is destroyed with the entire crew may happen the same effect.
The first solution to this is at quests.c :
DEFAULT CODE :
void CharacterDeadProcess()
{
aref charef = GetEventData();
ref chref = GetCharacter(sti(charef.index));
int charType = FindFellowtravellers(pchar,chref);
switch(charType)
{
case FELLOWTRAVEL_COMPANION:
RemoveCharacterCompanion(pchar,chref);
break;
case FELLOWTRAVEL_OFFICER:
RemoveOfficersIndex(pchar,sti(chref.index));
RemovePassenger(pchar,chref);
break;
case FELLOWTRAVEL_PASSENGER:
RemovePassenger(pchar,chref);
break;
case FELLOWTRAVEL_CAPTIVE:
RemovePassenger(pchar,chref);
break;
}
QuestsCheck();
}
FIXED CODE :
void CharacterDeadProcess()
{
aref charef = GetEventData();
ref chref = GetCharacter(sti(charef.index));
int charType = FindFellowtravellers(pchar,chref);
switch(charType)
{
case FELLOWTRAVEL_COMPANION:
RemoveCharacterCompanion(pchar,chref);
break;
case FELLOWTRAVEL_OFFICER:
RemovePassenger(pchar, chref);
string sColony = pchar.location;
int iColony = -1;
iColony = FindColony(sColony);
if(iColony == -1)
{
iColony = FindLocation(sColony);
if(iColony != -1)
{
sColony = Locations[iColony].fastreload;
ReturnOfficerToBase(chref, sColony);
}
}
break;
case FELLOWTRAVEL_PASSENGER:
RemovePassenger(pchar,chref);
break;
case FELLOWTRAVEL_CAPTIVE:
RemovePassenger(pchar,chref);
break;
}
QuestsCheck();
}
It fixes 50% of the problem, when your fighter dies now it does return to the tabern queue, the problem is that when you rehire someone else from the queue it just deletes him, at least now they are showing back at the queue.
This is the event when you dismiss a officer ( it works properly and took the code from there to release when he dies )
void AcceptReleaseOfficer()
{
RemovePassenger(pchar, xi_refCharacter);
string sColony = pchar.location;
int iColony = -1;
iColony = FindColony(sColony);
if(iColony == -1)
{
iColony = FindLocation(sColony);
if(iColony != -1)
{
sColony = Locations[iColony].fastreload;
ReturnOfficerToBase(xi_refCharacter, sColony);
}
}
FillCharactersScroll();
FillPassengerScroll();
ExitRemoveOfficerMenu();
SendMessage(&GameInterface,"lsl",MSG_INTERFACE_SCROLL_CHANGE,"CHARACTERS_SCROLL",-1);
SendMessage(&GameInterface,"lsl",MSG_INTERFACE_SCROLL_CHANGE,"PASSENGERSLIST",-1);
ReMappingSkills();
SetVariable();
}
And this is the most important function, ITS REALLY WEIRD
void ReturnOfficerToBase(aref chr, string sColony)
{
EraseOfficerFromBase(chr.id);
/*string sId = chr.id;
chr.loyality = sti(chr.loyality) - 5;
officers[FindOfficerStek(sId)].character = sti(chr.index);
officers[FindOfficerStek(sId)].hired = "0";
officers[FindOfficerStek(sId)].nation = sti(chr.nation);
officers[FindOfficerStek(sId)].colony = sColony;*/
}
since /* */ disables code, the function just do a EraseOfficerFromBase(chr.id);
????? i am now really lost <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid="

" border="0" alt="sad.gif" />
Traking it down finished at GenerateOfficer(int iStep, int iOfficerType)
Seems the function is not by default reseting the health of the player.