Advanced Search

Author Topic: Charge Weapon Release Precision  (Read 1344 times)

0 Members and 1 Guest are viewing this topic.

August 03, 2016, 04:57:01 AM
Read 1344 times

Offline JaxOf7

  • MM8BDM Extender
  • *****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Charge Weapon Release Precision
« on: August 03, 2016, 04:57:01 AM »
Code: [Select]
Wild Coil
Hold3:
WCOI H 1 ACS_ExecuteAlways(991,0,75)
WCOI I 1 ACS_ExecuteAlways(991,0,76)
WCOI A 1 ACS_ExecuteAlways(991,0,58)
WCOI A 0 A_JumpIfInventory("IsBot", 1, "BotFire")
WCOI H 0 A_Refire
Goto Fire2

Code: [Select]
Pharaoh Shot
Hold3:
TNT1 A 1
TNT1 A 0 A_JumpIfInventory("IsBot", 1, "Botfire")
TNT1 A 0 A_Refire
TNT1 A 0 A_JumpIfInventory("WeaponCharge",78,"Throw3")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",33,"Throw2")
Goto Throw1

As you can see on Wild Coil, it has 3 tics before each A_refire check while Pharaoh Shot only has 1.
This means if you, say, released you fire button for 1 tic with wild coil (not unreasonable in high octane combat mind you), there's a chance it may not fire. (and if it does fire, there's random 1-2 tic delay on top of online latency)
Pharaoh Shot will always fire.
The controls should be tight to 1 tic like Pharaoh Shot is.
A_Refire("state") exists now, so this is easier to do than ever before.

Also here's a test file in case you want to test release timing http://allfearthesentinel.net/download?file=firereleasetime.pk3
If a "1" shows up and the weapon isn't firing, then you have messed up.

August 03, 2016, 05:00:59 AM
Reply #1

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: Charge Weapon Release Precision
« Reply #1 on: August 03, 2016, 05:00:59 AM »
Yeah..
I get what you mean.

Magma Bazooka was horrible about it during development because of its four-frame charge animation.
It was changed to use a similar thing you mentioned here.

Moved to pending.

September 12, 2016, 11:24:07 AM
Reply #2

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: Charge Weapon Release Precision
« Reply #2 on: September 12, 2016, 11:24:07 AM »
I think we need a better way to do the charge up animation so that all charge weapons use 1 tic for checking. Maybe something using the gun flash state? I will experiment.

September 12, 2016, 04:46:08 PM
Reply #3

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: Charge Weapon Release Precision
« Reply #3 on: September 12, 2016, 04:46:08 PM »
Done. Effected weapons are all the buster upgrades, Pharaoh Shot, Tengu Blade, Atomic Fire, Homing Sniper and Magma Bazooka.