Tinkerton55 / SourceFOQ

Source engine modified for FOQ
1 stars 0 forks source link

Shotgun fire is delayed after reload #5

Open Tinkerton55 opened 7 years ago

Tinkerton55 commented 7 years ago

After loading a shell, the shotgun still can't be fired for a short period of time. Possibly a few extra frames of animation or gpGlobals->curtime + some_period is not set properly somewhere.

Tinkerton55 commented 7 years ago

The most likely cause of this problem is that the shotgun uses _mflNextAttack = gpGlobals->curtime + SequenceDuration(); when loading shells into it. This then delays the primary attack by a few extra frames contained in the animation (after the shell clicks into place). The time to load the next shell and the time to fire the next shot need to be decoupled and represented by two separate variables instead. Reloading should not interfere with the availability of primary attacks.