---------------------------------------------------------------------------------------------------------------
Simple Server Side Reticle Fix Tutorial
---------------------------------------------------------------------------------------------------------------
This is how I add weapon reticles server side. You only need to edit 3 functions this way (might be easier then some other methods).
Step #1
// ------------------------------------------
// Weapons.cs
// ------------------------------------------
1a) Add this to the bottom of function WeaponImage::onMount (Note: These are only examples how to do
it using some of my weapons. you'll need to add an else if statement for each new weapon you add):
if (%this.item $= "EMPMortar" || %this.item $= "PulseMortar") //Add any new weapons from here
%obj.client.setWeaponsHudActive("Mortar");
else if(%this.item $= "Flakgun")
%obj.client.setWeaponsHudActive("Chaingun"); //to here. Set them to the weapon of reticle it uses.
%obj.client.setWeaponsHudActive(%this.item); //Add this at the end. It handles the highlighting of icons.
2a) Do the same to function WeaponImage::onUnmount. except add a 1 to the end like this:
if (%this.item $= "EMPMortar" || %this.item $= "PulseMortar") //Add any new weapons from here
%obj.client.setWeaponsHudActive("Mortar", 1);
else if(%this.item $= "Flakgun")
%obj.client.setWeaponsHudActive("Chaingun", 1); //to here. Set them to the weapon of reticle it uses.
%obj.client.setWeaponsHudActive(%this.item, 1);
Step #2
// ------------------------------------------
// serverCommandMap.cs
// ------------------------------------------
This does the same as when you mount weapons, except it handles when you come out of
the command map. Add this to the bottom of function serverCmdResetControlObject:
if(isObject(%client.player))
{
%this = %client.player.getMountedImage($WeaponSlot);
if (isObject(%this))
{
if (%this.item $= "EMPMortar" || %this.item $= "PulseMortar") //Add any new weapons from here
%client.setWeaponsHudActive("Mortar");
else if(%this.item $= "Flakgun")
%client.setWeaponsHudActive("Chaingun"); //to here. Set them to the weapon of reticle it uses.
%client.setWeaponsHudActive(%this.item);
}
}