WeaponMechanics / WeaponMechanicsCosmeticsWiki

Wiki for the WeaponMechanicsCosmetics plugin
6 stars 0 forks source link

Fake item won't disappear in Firearm_Action #32

Closed ASTRICKK closed 1 year ago

ASTRICKK commented 1 year ago

Has this issue already been reported? Did you ask for help before making this report?

Current Behavior

Here is my setting for my Firearm_Action

Firearm_Action:
    Type: "LEVER"
    Open:
      Time: 20
      Mechanics:
      - "CustomSound{sound=item_switch, volume=1, pitch=1, delayBeforePlay=0, noise=0.1}"
      - "CustomSound{sound=sniper3_bolt_out, volume=1, pitch=1, delayBeforePlay=10, noise=0.1}"
      - "CustomSound{sound=shell_out, volume=1, pitch=1, delayBeforePlay=17, noise=0.1}"
      - "CustomSound{sound=shell_drop, volume=1, pitch=1, delayBeforePlay=30, noise=0.1}"
    Close:
      Time: 10
      Mechanics:
      - "FakeItem{type=SNOWBALL, time=100, customModelData=15, velocity=~-1.1 0.1 0} @Source{eye=true, offset=~-0.3 -0.2 1}"
      - "CustomSound{sound=item_switch, volume=1, pitch=1, delayBeforePlay=0, noise=0.1}"
      - "CustomSound{sound=sniper3_bolt_in, volume=1, pitch=1, delayBeforePlay=0, noise=0.1}"

I set the disappear time to 100 ticks but it won't disappear.

Expected Behavior

I don't know, Might be just a bug.

Steps To Reproduce

I don't know what is this mean. sorry :(

Frequency

100%

Version and Log

There are no error in my console. CJ already has checked it and I've sent my T-5000 sniper config to him. He said he will check it.

Anything else?

WM and WMC is amazing.

DeeCaaD commented 1 year ago

This bug is related to WMC.

This happens because all tasks of firearm actions (and reload) are cancelled when the required actions are finished. One possible fix would be to not give other than sound tasks for task id consumer.

https://github.com/WeaponMechanics/WeaponMechanicsCosmetics/blob/main/src/main/java/me/cjcrafter/weaponmechanicscosmetics/mechanics/FakeItemMechanic.java#L64

CJCrafter commented 1 year ago

fixed today, check for download later