The function LoginCharacter (in character_login.c) has a weird stutter in it. It is probably caused by this part
Need to look at this further cause this function is called for almost all monsters and fantoms and we are talking about almost a second of lag for running it once. So When a location with 10 fantoms needs to be loaded this one causes a lot of loading time.
Code:
if (isSoldier(chr) != UNKNOWN_NATION) GiveSoldierWeapon(chr, makeint(GetAttribute(chr, "nation"))); // PB: Re-Update Soldier Weapons
// KK -->
if (CheckAttribute(chr, "old.blade")) {
if (GetCharacterItem(chr, chr.old.blade) == 0) GiveItem2Character(chr, chr.old.blade);
DeleteAttribute(chr, "old.blade");
}
if (CheckAttribute(chr, "old.gun")) {
if (GetCharacterItem(chr, chr.old.gun) == 0) GiveItem2Character(chr, chr.old.gun);
DeleteAttribute(chr, "old.gun");
}
Need to look at this further cause this function is called for almost all monsters and fantoms and we are talking about almost a second of lag for running it once. So When a location with 10 fantoms needs to be loaded this one causes a lot of loading time.