A way to check the ReloadCounter without incrementing it.

Moderator: GZDoom Developers

Post Reply
Blzut3
 
 
Posts: 3206
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

A way to check the ReloadCounter without incrementing it.

Post by Blzut3 »

While looking to converting a version of the Skulltag rail gun where pressing the alt fire button would cause it to reload I noticed a small short coming on the A_CheckForReload function. Since it always increments the counter whenever it is called it becomes difficult to check if a weapon has or has not been fired. I suggest adding an extra argument for if the counter should be incremented.

Code: Select all

	AltFire:
		RLGG A 0 A_CheckForReload(1, "FinishAltFire", 0)
		RLGG E 6
		goto Reload
	FinishAltFire:
		RLGG A 1
		goto Ready
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: A way to check the ReloadCounter without incrementing it.

Post by HotWax »

Hmmm, so checking the value changes the value eh? Sounds like quantum physics to me. ;)
CO2
Posts: 42
Joined: Tue Jul 29, 2008 9:24 am

Re: A way to check the ReloadCounter without incrementing it.

Post by CO2 »

Actually, the wiki says this has been implemented.

A_CheckForReload (int counter, str state[, bool dontincrement])
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: A way to check the ReloadCounter without incrementing it.

Post by Gez »

Blzut sneaked it in another patch recently, that's why it has been added without getting this thread closed.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”