Old Cell ammo counter still shows on HUD
Posted: Sat Aug 29, 2020 4:07 am
by HellBlade64
I replaced all vanilla ammo types with new versions of themselves to reduce how much max ammo a player can carry.
For some reason, there are two cell counters.
One is for Cell, and the other is Cell2.
Cell holds the original 600 max while Cell2 holds a max of 300.
On top of that, there is a duplicate of the Plasma Rifle on the HUD, too.
I don't know why any of this is happening. I can only guess sloppy code.
But there's not a single weapon in the mod that uses the original ammo.
Provided below are a screenshot and the whole code lump which contains the ammo replacements.
Screenshot showing the extra plasma rifle and cell counter
For some reason, there are two cell counters.
One is for Cell, and the other is Cell2.
Cell holds the original 600 max while Cell2 holds a max of 300.
On top of that, there is a duplicate of the Plasma Rifle on the HUD, too.
I don't know why any of this is happening. I can only guess sloppy code.
But there's not a single weapon in the mod that uses the original ammo.
Provided below are a screenshot and the whole code lump which contains the ammo replacements.
Screenshot showing the extra plasma rifle and cell counter
Spoiler: (Open)Here is the full "VanillaWeaps" decorate lump
Notice how there is a second plasma rifle under the bfg10k
And the extra cells counter under the normal 300 max one.
Spoiler: (Open)Also here is the full KEYCONF lumpCode: Select all
Actor StartFist : Fist { Tag "Knuckle Duster" AttackSound "FistPunch" States { Ready: PUNG A 0 A_PlaySound("FistUp") PUNG A 1 A_WeaponReady Goto Ready+1 Fire: PUNG B 4 TNT1 A 0 A_JumpIfInventory("PowerStrength", 1, "Berserked") Normal: PUNG C 4 A_CustomPunch(2 * random(1, 10), TRUE,0,BulletPuff,74,1) //Expected ")" but got "," Goto FireEnd //Nice, nice. //So I can program the fist to have vampirism, Berserked: //but I can't limit how much health the meleer gets from each punch. PUNG C 4 A_CustomPunch(20 * random(1, 10), TRUE,0,BulletPuff,74,1) //Fucking genious, I tell you. FireEnd: PUNG D 5 PUNG C 4 PUNG B 5 A_ReFire Goto Ready+1 } } Actor Fist2 : Fist replaces Fist { Tag "Knuckle Duster" States { Ready: PUNG A 0 A_PlaySound("FistUp") PUNG A 1 A_WeaponReady Goto Ready+1 } } Actor Pistol2 : Pistol replaces Pistol { Tag "Pistol" Weapon.AmmoType "Clip2" Weapon.AmmoUse "1" Decal BulletChip States { Ready: PISG A 0 A_PlaySound("PistolUp") PISG A 1 A_WeaponReady Goto Ready+1 Fire: PISG A 4 PISG B 0 A_PlaySound("weapons/pistol") PISG B 0 A_TakeInventory("Clip",1,TIF_NOTAKEINFINITE) PISG B 1 Bright A_FireBullets(0,0,1,random(1,3),"BulletPuff",0) PISG CDEF 2 PISG F 1 PISG F 2 A_ReFire Goto Ready+1 Flash: PISF A 7 Bright A_Light1 Goto LightDone PISF A 7 Bright A_Light1 Goto LightDone } } Actor Shotgun2 : Shotgun replaces Shotgun { Tag "Shotgun" Weapon.AmmoType "Shell2" States { Ready: SHTG A 0 A_PlaySound("ShotUp") SHTG A 1 A_WeaponReady Goto Ready+1 } } Actor SuperShotgun2 : SuperShotgun replaces SuperShotgun { Tag "Super Shotgun" Weapon.AmmoType "Shell2" States { Ready: SHT2 A 0 A_PlaySound("weapons/sshotc") SHT2 A 1 A_WeaponReady Goto Ready+1 } } Actor Chaingun2 : Chaingun replaces Chaingun { Tag "Chaingun" Weapon.AmmoType "Clip2" States { Ready: CHGG A 0 A_PlaySound("ChaingunUp") CHGG A 1 A_WeaponReady Goto Ready+1 } } Actor Minigun2 : Minigun replaces Minigun { Tag "Minigun" Weapon.AmmoType "Clip2" States { Ready: MNGG A 0 A_PlaySound("MiniGUp") MNGG A 1 A_WeaponReady Goto Ready+1 } } Actor RocketLauncher2 : RocketLauncher replaces RocketLauncher { Tag "Rocket Launcher" Weapon.AmmoType "RocketAmmo2" States { Ready: MISG A 0 A_PlaySound("RocketUp") MISG A 1 A_WeaponReady Goto Ready+1 } } Actor GrenadeLauncher2 : GrenadeLauncher replaces GrenadeLauncher { Tag "Grenade Launcher" Weapon.AmmoType "RocketAmmo2" States { Ready: GRLG A 0 A_PlaySound("GrenUp") GRLG A 1 A_WeaponReady Goto Ready+1 } } Actor CoopPlasmaRifle : PlasmaRifle replaces PlasmaRifle { Tag "Plasma Gun" Weapon.AmmoType "Cell2" States { Ready: PLSG A 0 A_PlaySound("PlasmaUp") PLSG A 1 A_WeaponReady Goto Ready+1 Fire: PLSF A 1 A_FireCustomMissile("PlasmaBall",0,1) PLSF BA 1 PLSG B 20 A_ReFire Goto Ready+1 } } Actor CoopBFG9000 : BFG9000 replaces BFG9000 { Weapon.AmmoType "Cell2" States { Ready: BFGG A 0 A_PlaySound("BFGUp") BFGG A 1 A_WeaponReady Goto Ready+1 Fire: BFGG A 20 A_BFGSound BFGG B 15 A_GunFlash BFGG C 6 A_FireBFG BFGG BA 5 A_ReFire Goto Ready+1 } } Actor CoopBFG10k : BFG10K replaces BFG10K { Tag "BFG10k" Weapon.AmmoType "Cell2" Decal BFGLightning States { Ready: BG2G A 20 A_PlaySound("10kUp") BG2G A 0 A_PlaySound("weapons/bfg10kidle") BG2G A 1 A_WeaponReady BG2G A 1 A_WeaponReady BG2G A 1 A_WeaponReady BG2G B 1 A_WeaponReady BG2G B 1 A_WeaponReady BG2G B 1 A_WeaponReady BG2G C 1 A_WeaponReady BG2G C 1 A_WeaponReady BG2G C 1 A_WeaponReady BG2G D 1 A_WeaponReady BG2G D 1 A_WeaponReady BG2G D 1 A_WeaponReady Goto Ready+1 Fire: BG2G E 20 A_PlaySound ("weapons/bfg10kf") BG2G F 4 BG2G G 1 BG2G H 1 BG2G I 1 BG2G J 1 Goto Hold Hold: BG2G K 2 A_GunFlash BG2G L 2 A_FireBullets(0,0,1,0,"BFG10kShot") BG2G M 2 BG2G N 0 A_ReFire BG2G O 35 A_PlaySound ("weapons/bfg10kcool") Goto Ready+1 } } Actor Clip2 : Ammo replaces Clip { Inventory.PickupMessage "$GOTCLIP" Inventory.Amount 10 Inventory.MaxAmount 200 Ammo.BackpackAmount 10 Ammo.BackpackMaxAmount 200 Inventory.Icon "CLIPA0" States { Spawn: CLIP A -1 Stop } } Actor ClipBox2 : Clip2 replaces ClipBox { Inventory.PickupMessage "$GOTCLIPBOX" Inventory.Amount 50 States { Spawn: AMMO A -1 Stop } } Actor Shell2 : Ammo replaces Shell { Inventory.PickupMessage "$GOTSHELLS" Inventory.Amount 4 Inventory.MaxAmount 50 Ammo.BackpackAmount 4 Ammo.BackpackMaxAmount 50 Inventory.Icon "SHELA0" States { Spawn: SHEL A -1 Stop } } Actor ShellBox2 : Shell2 replaces ShellBox { Inventory.PickupMessage "$GOTSHELLBOX" Inventory.Amount 20 States { Spawn: SBOX A -1 Stop } } Actor RocketAmmo2 : Ammo replaces RocketAmmo { Inventory.PickupMessage "$GOTROCKET" Inventory.Amount 1 Inventory.MaxAmount 50 Ammo.BackpackAmount 1 Ammo.BackpackMaxAmount 50 Inventory.Icon "ROCKA0" States { Spawn: ROCK A -1 Stop } } Actor RocketBox2 : RocketAmmo2 replaces RocketBox { Inventory.PickupMessage "$GOTROCKBOX" Inventory.Amount 5 States { Spawn: BROK A -1 Stop } } Actor Cell2 : Ammo replaces Cell { Inventory.PickupMessage "$GOTCELL" Inventory.Amount 20 Inventory.MaxAmount 150 Ammo.BackpackAmount 20 Ammo.BackpackMaxAmount 300 Inventory.Icon "CELLA0" States { Spawn: CELL A -1 Stop } } Actor CellPack2 : Cell2 replaces CellPack { Inventory.PickupMessage "$GOTCELLBOX" Inventory.Amount 100 States { Spawn: CELP A -1 Stop } }
Spoiler: (Open)Code: Select all
ClearPlayerClasses AddPlayerClass FistStart AddPlayerClass PistolStart AddPlayerClass ShotgunStart AddPlayerClass ChaingunStart WeaponSection FistStart SetSlot 1 StartFist Chainsaw AbyssClaw SetSlot 2 Pistol2 AbyssRevolver SetSlot 3 Shotgun2 SuperShotgun2 QuadShotgun AbyssShrapnelGun SetSlot 4 Chaingun2 Minigun2 SetSlot 5 RocketLauncher2 GrenadeLauncher2 SetSlot 6 CoopPlasmaRifle SonicRailgun SetSlot 7 CoopBFG9000 CoopBFG10k SetSlot 8 AbyssHands AbyssLightning WeaponSection PistolStart SetSlot 1 StartFist Fist2 Chainsaw AbyssClaw SetSlot 2 Pistol2 AbyssRevolver SetSlot 3 Shotgun2 SuperShotgun2 QuadShotgun AbyssShrapnelGun SetSlot 4 Chaingun2 Minigun2 SetSlot 5 RocketLauncher2 GrenadeLauncher2 SetSlot 6 CoopPlasmaRifle SonicRailgun SetSlot 7 CoopBFG9000 CoopBFG10k SetSlot 8 AbyssHands AbyssLightning WeaponSection ShotgunStart SetSlot 1 StartFist Fist2 Chainsaw AbyssClaw SetSlot 2 Pistol2 AbyssRevolver SetSlot 3 Shotgun2 SuperShotgun2 QuadShotgun AbyssShrapnelGun SetSlot 4 Chaingun2 Minigun2 SetSlot 5 RocketLauncher2 GrenadeLauncher2 SetSlot 6 CoopPlasmaRifle SonicRailgun SetSlot 7 CoopBFG9000 CoopBFG10k SetSlot 8 AbyssHands AbyssLightning WeaponSection ChaingunStart SetSlot 1 StartFist Fist2 Chainsaw AbyssClaw SetSlot 2 Pistol2 AbyssRevolver SetSlot 3 Shotgun2 SuperShotgun2 QuadShotgun AbyssShrapnelGun SetSlot 4 Chaingun2 Minigun2 SetSlot 5 RocketLauncher2 GrenadeLauncher2 SetSlot 6 CoopPlasmaRifle SonicRailgun SetSlot 7 CoopBFG9000 CoopBFG10k SetSlot 8 AbyssHands AbyssLightning
