Good afternoon. Today I want to share the improvements for shooting from the pistol. First, we fix the bug. The hero is not fully loaded with a pistol, enough bullets. Just waiting for the recharge. But it's worth to move from the location to the location as the gun is immediately charged. I'm talking about the original game. No one has fixed it.
Find "void SetEquipedItemToCharacter" in "\Program\characters\characterUtilite.c"
We make a duplicate of this function and rename it.
My new function call "SetEquipedItemToCharacterNew"
In the duplicate, we remove the lines
if(CheckAttribute(arItm,"chargeQ"))
{ LAi_GunSetChargeQuant(chref,sti(arItm.chargeQ));
} else
{ LAi_GunSetChargeQuant(chref,0);
}
Then we look for the function and "ExecuteCharacterEquip" replace it with the analogue below.
void ExecuteCharacterEquip(ref chref)
{
string stmp;
stmp = GetCharacterEquipByGroup(chref,BLADE_ITEM_TYPE);
if(stmp!="")
{
if(chref.id == pchar.id || IsOfficer(chref))
{
SetEquipedItemToCharacterNew(chref, BLADE_ITEM_TYPE, stmp);
}
else
{
SetEquipedItemToCharacter(chref, BLADE_ITEM_TYPE, stmp);
}
}
stmp = GetCharacterEquipByGroup(chref,GUN_ITEM_TYPE);
if(stmp!="")
{
if(chref.id == pchar.id || IsOfficer(chref))
{
SetEquipedItemToCharacterNew(chref, GUN_ITEM_TYPE, stmp);
}
else
{
SetEquipedItemToCharacter(chref, GUN_ITEM_TYPE, stmp);
}
}
}
Now the gun of the hero and his officers will not be charged when we move from the location to the location. It will be necessary to wait for it to be charged.
Find "void SetEquipedItemToCharacter" in "\Program\characters\characterUtilite.c"
We make a duplicate of this function and rename it.
My new function call "SetEquipedItemToCharacterNew"
In the duplicate, we remove the lines
if(CheckAttribute(arItm,"chargeQ"))
{ LAi_GunSetChargeQuant(chref,sti(arItm.chargeQ));
} else
{ LAi_GunSetChargeQuant(chref,0);
}
Then we look for the function and "ExecuteCharacterEquip" replace it with the analogue below.
void ExecuteCharacterEquip(ref chref)
{
string stmp;
stmp = GetCharacterEquipByGroup(chref,BLADE_ITEM_TYPE);
if(stmp!="")
{
if(chref.id == pchar.id || IsOfficer(chref))
{
SetEquipedItemToCharacterNew(chref, BLADE_ITEM_TYPE, stmp);
}
else
{
SetEquipedItemToCharacter(chref, BLADE_ITEM_TYPE, stmp);
}
}
stmp = GetCharacterEquipByGroup(chref,GUN_ITEM_TYPE);
if(stmp!="")
{
if(chref.id == pchar.id || IsOfficer(chref))
{
SetEquipedItemToCharacterNew(chref, GUN_ITEM_TYPE, stmp);
}
else
{
SetEquipedItemToCharacter(chref, GUN_ITEM_TYPE, stmp);
}
}
}
Now the gun of the hero and his officers will not be charged when we move from the location to the location. It will be necessary to wait for it to be charged.