I have a gun which is supposed to act exactly like the original default gun, except that it has ammo, no projectile, and no sounds.
datablock ShapeBaseImageData(SpaceGunImage : GunImage)
{
casing = SpaceGunShellDebris;
colorShiftColor = "0.1 0.1 0.1 1";
correctMuzzleVector = 0;
item = SpaceGunItem;
projectile = "";
stateScript[0] = "onDraw";
stateSound[0] = "";
stateTransitionOnTimeout[0] = "AmmoCheck";
stateSound[2] = "";
stateSequence[4] = "AmmoCheck";
stateTransitionOnTriggerUp[4] = "AmmoCheck";
stateName[5] = "AmmoCheck";
stateTransitionOnAmmo[5] = "Ready";
stateTransitionOnTriggerDown[5] = "DryFire";
stateSequence[5] = "AmmoCheck";
stateName[6] = "DryFire";
stateScript[6] = "onDryFire";
stateSequence[6] = "DryFire";
stateTransitionOnTriggerUp[6] = "AmmoCheck";
};
Everything works fine, except for the minor hitch where when the gun fires, the slide doesn't completely return to its starting position like on the default gun, which causes it to visibly jump a couple pixels forward when the mouse button is released.
Does anyone know why this is happening and how to fix it?