Added upgrade code in weapons.c