Page 1 of 1
[1.0.29] Reloading no longer works in my mod
Posted: Mon Nov 19, 2007 5:12
by lizardcommando
I was testing my mod out with the newest version of GZDoom and for some lame reason, if I use the IDFA/IDKFA cheat to get all guns and stuff, I can't reload any of my guns. It won't work anymore unlike in previous versions of ZDoom and GZDoom. What the hell is going on? Someone please help me!
I didn't even change anything to it since last month. Can someone with extensive DECORATE knowledge please take a look at it?
http://www.zshare.net/download/4841275ece5d25/
Just to let you know, the guns work properly if you use the "Summon" console command (IE: summon magnum, etc). This is really weird...
Posted: Mon Nov 19, 2007 9:19
by Graf Zahl
There were some minor changes to ammo handling so it's possible something in there breaks reloading.
Posted: Mon Nov 19, 2007 9:22
by lizardcommando
Ah crap.... This sucks ass. So does this mean I'll have to do some major recoding with most of the weapons?
Posted: Mon Nov 19, 2007 16:54
by Azure Agony
I said about this problem in my post "Decorate label problem"
Posted: Mon Nov 19, 2007 18:21
by TheDarkArchon
Graf Zahl wrote:There were some minor changes to ammo handling so it's possible something in there breaks reloading.
I think it has something to do with the backpack. The ammo types that handle reloading in the mod don't have Ammo.BackpackMaxAmount defined and unless the player picks up the weapon in question before the backpack, said ammo types will end up having a maximum value of 0, not Inventory.MaxAmount. Any types picked up before the backpack are unaffected.
Posted: Mon Nov 19, 2007 18:35
by Graf Zahl
Thanks for that information.
Actually this was a very old bug that has been there since the addition of the new inventory system but it was masked by the other bug I fixed recently.
Posted: Mon Nov 19, 2007 18:37
by TheDarkArchon
Is it to do with *ABackpackItem::CreateCopy blindly assuming that the BackpackMaxAmount was initialised for new ammo types when picking up a backpack?
Posted: Mon Nov 19, 2007 20:29
by lizardcommando
Ok, so to fix this, do I do what TDA suggested? How would the coding look in DECORATE?
Posted: Mon Nov 19, 2007 21:37
by Graf Zahl
It's a bug. You have to wait for the next version.
Posted: Mon Nov 19, 2007 21:38
by TheDarkArchon
Adding one line should solve it. The coding would look like this:
Code: Select all
ACTOR ReloadanGaems : Ammo
{
Inventory.MaxAmount x
Ammo.BackpackMaxAmount x
Inventory.Icon ICON
}
x being the clip size, ICON being the icon you want to use. Everything else to do with the weapon stays the same.
Posted: Tue Nov 20, 2007 1:52
by lizardcommando
Graf Zahl wrote:It's a bug. You have to wait for the next version.
Well, I guess I'll just have to wait for the next version then.
