[Critical] Attachment weapon can be "detached", Round 2 #295


  • New
  • Defect
Open
Assigned to shampaggon
  • _ForgeUser1569130 created this issue Jul 5, 2015

    Dear Shampaggon, I believe you can remember the last update for my last ticket and you may think I am making same ticket by accident. It is not. In v0.98.5, still players able to make the "game breaker" gun.

    #-------------- What steps will reproduce the problem?
    1. Make a weapon that has attachment and have burst fire on said attachment.
    2. Fire the attachment.
    3. While firing the burst fire, swap the firing weapon to any items that you have.

    #-------------- What happened?
    The item is swapped to said attachment, swapped items are renamed in weapon name (not Item_Information module one), can be fired infinitely.

    #-------------- What was supposed to happen?
    This problem supposed to be fixed at 0.98.5 but still happening. I can reproduce the issue everytime I try.

    #-------------- What version of CrackShot are you using?
    v0.98.5. Current newest version.

    #-------------- What version of CraftBukkit/Spigot are you using?
    Tested via Spigot 1.8.3.

    #-------------- Were there any errors in the console? If so, what were they?
    None.

    #-------------- Please provide your configuration file if necessary.
    http://hastebin.com/usiyurisuh.sm

  • _ForgeUser1569130 added the tags New Defect Jul 5, 2015
  • Shampaggon posted a comment Jul 5, 2015

    I could not reproduce this problem. The following steps were used:

    1. Fire the Shuriken attachment in slot 1 of the hotbar.
    2. Switch, mid-burst, to another CrackShot weapon or vanilla item in the hotbar.

    In all cases, the burst terminates and nothing happens.


    Edited Jul 6, 2015
  • _ForgeUser1569130 posted a comment Jul 6, 2015

    Uh, I could not reproduce this issue either. Same Setup, same plugins, only happening on live server and never happening on test server...

    Anyway, I am guessing this is because Crackshot is changing the item name everytime you shot something for ammo counts. I am guessing this is happening because:

    1. Fire the weapon.
    2. Server lags for 1 or 2 ticks.
    3. Player swaps Crackshot weapons to other items while firing.
    4. Crackshot is going to change the weapon name for ammo counts.
    5. Items are swapped *before* Crackshot changes it's name.
    6. Crackshot successfully changes item name, but it is processed after server actually swaps item slots.

    So, this is not really an issue of Crackshot but more like timing thingy. Still, it is great if you would implement item ID check or something before changing weapon names for ammo counts so this will never happen on any server. If you check item IDs before changing item names for ammo counts, this won't happen at the first place. Plus, this is single task of easy check so it will not affect server performance I believe too.

    Please consider implementing checks before changing item name if you got spare time.

  • Shampaggon posted a comment Jul 6, 2015

    @umegonta: Go

    Interesting theory, but that's actually impossible. Also, there are checks in place; this is something more complicated. Feel free to let me know if you discover anything else.


To post a comment, please login or register a new account.