[fixed][0.9.1] Zen Dynamics ammo handling is screwed up.

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell

[fixed][0.9.1] Zen Dynamics ammo handling is screwed up.

Post by TheDarkArchon »

Weapons use twice as much ammo to reload and weapons drain reserve ammo when they fire.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!

Post by wildweasel »

I've encountered the same bug with my own project (which uses a similar setup but no ACS scripting) - my best guess is that for some reason GZDoom ignores the "AmmoUse" property when it's set to zero.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

This is exactly the same code as ZDoom 2.0.96x so it is a little strange that this happens.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!

Post by wildweasel »

Would it help if I were to post the decorate code for a specific weapon that has the problem?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

Sure.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell

Post by TheDarkArchon »

I think the ignorance of UseNoAmmo is the problem: My version of the Zen SMG, which ejects smoke and casing as well as a bullet, uses 3 ammo per shot instead of one.


The DECORATE code:

Code: Select all

ACTOR ZenSMG : Weapon
{
   Weapon.SelectionOrder 200
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You got the Zen-II 9mm SMG!"
   Weapon.AmmoType "ZenClip"
   Weapon.AmmoGive 25
   Weapon.AmmoUse 1
   Weapon.Kickback 90
   AttackSound "weapons/zenfire"
   Obituary "%o face %k's Zen II SMG"
   States
   {
   Spawn:
      ZSMG A -1
      Loop
   Ready:
      ZENG A 1 A_WeaponReady
      Loop
   Deselect:
      ZENG A 1 A_Lower
      Loop
   Select:
      ZENG A 1 A_Raise
      Loop
   Fire:
      ZENG A 0 A_GunFlash
	ZENG B 0 BRIGHT A_FireCustomMissile("ZenSmoke",0,0,1,6)
	ZENG B 0 BRIGHT A_FireCustomMissile("9MMcasing",-45+random(-8,8),0,0,6)
      ZENG B 1 BRIGHT A_FireBullets(4,4,1,3,0,1,7296)
      ZENG C 1 BRIGHT
      ZENG D 2
      ZENG A 2 A_Refire  
      goto Ready
   Flash:
      ZENF A 1 BRIGHT A_Light2
      ZENF B 1 BRIGHT A_Light1
      ZENF E 0 BRIGHT A_Light0
      Stop
   }
}

ACTOR ZenClip : Ammo 2007
{
	Radius 20
	Height 16
	Inventory.PickupMessage "Picked up a Zen-II 9mm clip."
        Inventory.PickupSound "misc/i_pkup"
	Inventory.Amount 25
	Inventory.MaxAmount 350
	Ammo.BackpackAmount 25
	Ammo.BackpackMaxAmount 700
	Inventory.Icon ZCLPA0
	States
	{
	Spawn:
	      ZCLP A -1
	      Stop
	}
}
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

Hopefully fixed. My code was still based on the buggy 7.8. release, not the corrected 8.8 version.

Return to “Closed Bugs”