[Not a bug] A_Firebullets numbullets field and shotguns

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

A_Firebullets numbullets field and shotguns

Postby Xtyfe » Tue Dec 01, 2020 7:30 pm

I'm not sure if this is a bug, an oversight or undefined behaviour but there is a not very well documented function of the "numbullets" field of A_FireBullets that when set to a negative number, stops the first shot from being 100% accurate.

This works all well and fine for weapons that only fire one bullet. But for weapons that fire more than that, setting it to something like -9, just fires one bullet instead.

I have attached a runnable example with 2 defined shotguns. One uses -9 for its numbullets field, and the other is my workaround by calling A_FireBullets 9 times with numbullets set to -1.

I feel it shouldn't have to be that way.
You do not have the required permissions to view the files attached to this post.
User avatar
Xtyfe
Neque Deos, Neque Dominos
 
Joined: 14 Dec 2007
Location: The Intertubes

Re: A_Firebullets numbullets field and shotguns

Postby InsanityBringer » Tue Dec 01, 2020 10:41 pm

Anything that fires more than one bullet should automatically never be accurate on the first shot, even if the value is positive. If it's not doing so, that's probably a different bug.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: A_Firebullets numbullets field and shotguns

Postby Xtyfe » Wed Dec 02, 2020 9:46 am

If that is the case, then there is no bug here and I was not aware of that. Again, this isn't well documented and I assumed that it would act the same as a single bullet weapon.
User avatar
Xtyfe
Neque Deos, Neque Dominos
 
Joined: 14 Dec 2007
Location: The Intertubes

Re: A_Firebullets numbullets field and shotguns

Postby Blue Shadow » Wed Dec 02, 2020 10:42 am

Edited the wiki. Is this better?
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: A_Firebullets numbullets field and shotguns

Postby InsanityBringer » Wed Dec 02, 2020 7:11 pm

That's much more clear, I feel at least. I had thought it was mentioned on the wiki, but I guess not.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: A_Firebullets numbullets field and shotguns

Postby Blue Shadow » Thu Dec 03, 2020 7:28 am

InsanityBringer wrote:I had thought it was mentioned on the wiki, but I guess not.

There was a mention of it. I just filled in the missing blanks and clarified a bit.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests