d3xter-dev / dayz-class-selection

DayZ Class Selection Mod
GNU General Public License v3.0
10 stars 5 forks source link

Mags take up space, while in gun. #6

Open m1egalius opened 3 years ago

m1egalius commented 3 years ago

If you spawn primary or secondary gun with multiple mags, there is unusable space in first container, where other mags spawn. You can't move any item to that slot, and server will print out error once you try. This can be worked around, by spawning additional mags in general items.

image

Sample config:

{
  "className": "Team A",
  "selected": 0,
  "primaryItems": [
    {
      "name": "AK74",
      "selected": 0,
      "quantity": 0,
      "attachments": [
        "AK_PlasticBttstck",
        "AK_RailHndgrd",
        "PSO11Optic"
      ],
      "cargo": [],
      "magazines": [
        {
          "name": "Mag_AK74_30Rnd",
          "quantity": 3
        }
      ]
    },
    {
      "name": "FAL",
      "selected": 0,
      "quantity": 0,
      "attachments": [
        "Fal_FoldingBttstck",
        "ReflexOptic"
      ],
      "cargo": [],
      "magazines": [
        {
          "name": "Mag_FAL_20Rnd",
          "quantity": 3
        }
      ]
    },
  ],
  "secondaryItems": [
    {
      "name": "Glock19",
      "selected": 0,
      "quantity": 0,
      "attachments": [],
      "cargo": [],
      "magazines": [
        {
          "name": "Mag_Glock_15Rnd",
          "quantity": 2
        }
      ]
    },
    {
      "name": "FNX45",
      "selected": 0,
      "quantity": 0,
      "attachments": [],
      "cargo": [],
      "magazines": [
        {
          "name": "Mag_FNX45_15Rnd",
          "quantity": 2
        }
      ]
    }
  ],
  "utilities": [
    {
      "name": "LandMineTrap",
      "selected": 0,
      "quantity": 1,
      "attachments": [],
      "cargo": [],
      "magazines": []
    },
    {
      "name": "Rangefinder",
      "selected": 0,
      "quantity": 1,
      "attachments": [],
      "cargo": [],
      "magazines": []
    }
  ],
  "generalItems": [
    {
      "name": "CombatKnife",
      "selected": 0,
      "quantity": 1,
      "attachments": [],
      "cargo": [],
      "magazines": []
    }
  ],
  "clothes": [
    {
      "top": "BDUJacket",
      "pants": "BDUPants",
      "shoes": "MilitaryBoots_Bluerock",
      "vest": "PlateCarrierVest",
      "gloves": "TacticalGloves_Green",
      "belt": "MilitaryBelt",
      "hat": "Mich2001Helmet",
      "glasses": "TacticalGoggles",
      "mask": "BalaclavaMask_Green",
      "armband": "Armband_Blue",
      "vestAttachments": [
        "PlateCarrierHolster",
        "PlateCarrierPouches",
        "M67Grenade",
        "M67Grenade",
        "M18SmokeGrenade_Red"
      ],
      "beltAttachments": [
        "Canteen",
        "PlateCarrierHolster"
      ]
    }
  ]
}

Server error:

[desync] HandleInputData man=SurvivorM_Cyril:02 CANNOT move cmd=SYNC_MOVE src={ type=CARGO item=Mag_Glock_15Rnd:024712 parent=PlateCarrierPouches:024697 idx=0 row=0 col=3 f=false } dst={ type=CARGO item=Mag_Glock_15Rnd:024712 parent=PlateCarrierPouches:024697 idx=0 row=0 col=2 f=false }
Class:      'DayZPlayerInventory'
Function: 'Error'
Stack trace:
scripts/1_Core/proto\endebug.c:44
scripts/4_World/systems\inventory\dayzplayerinventory.c:608
scripts/4_World/systems\inventory\dayzplayerinventory.c:1102
scripts/4_World/systems\inventory\dayzplayerinventory.c:482

Runtime mode
CLI params: config serverDZ.cfg port 2302 dologs  adminlog  netlog  freezecheck  profiles D:\SteamLibrary\steamapps\common\DayZServer\profiles mod @CF;@Code Lock;@BaseBuildingPlus;@MunghardsItempack;@SchanaModParty;@Unlimited Stamina;@VanillaPlusPlusMap;@zSpawnSelection;@DayZ Class-Selection;@ZomBerry Admin Tools; 
d3xter-dev commented 3 years ago

Thanks for the details, gonna look into it asap

ACanadianBear commented 3 years ago

I've got the exact same issue.

Typically triggers and crashes the server when a player joins the server after someone has interacted with a players inventory.

The server will recover. For the time being I have removed landmines.

[desync] HandleInputData man=SurvivorM_Rolf:03 CANNOT move cmd=SYNC_MOVE src={ type=CARGO item=LandMineTrap:04162 parent=HuntingJacket_Autumn:04138 idx=0 row=0 col=0 f=false } dst={ type=CARGO item=LandMineTrap:04162 parent=PressVest_LightBlue:04186 idx=0 row=0 col=0 f=false } Class: 'DayZPlayerInventory' Function: 'Error' Stack trace: scripts/1_Core/proto\endebug.c:44 scripts/4_World/systems\inventory\dayzplayerinventory.c:608 scripts/4_World/systems\inventory\dayzplayerinventory.c:1102 scripts/4_World/systems\inventory\dayzplayerinventory.c:482

Runtime mode CLI params: config serverDZ.cfg.active port 2502 profiles profiles adminlog freezecheck dologs filePatching nopause mod @CF;@DayZ Class-Selection; serverMod @GameLabs;

UneveNBR commented 3 years ago

Same problem here... It seems to me that this empty space is exactly the magazine that goes to the weapon when respawning. Does adding other mags end up generating another problem slot?