The mines dispensed from the mine dispensers tend tend to be launched towards the left. Expected behavior would be a even distribution of mines from the center line.
See screenshots below for reference.
The mines dispensed from the mine dispensers tend tend to be launched towards the left. Expected behavior would be a even distribution of mines from the center line.
See screenshots below for reference.
Reproduced on 1.77.142584 of the development branch.
I can't reproduce that the mines always gather on the left side. The pattern is random though and the majority of mines can gather on either left and right side.
Strange, I tested it locally on the editor, and in numerous tests they always went left. Is it possible that it keeps using the same seed (Edit: in the same session), resulting in the same pattern?
I used the Mine Dispenser 6 times and took screenshots of the resulting minefield patterns (by using the new mine detector interface). Here it looks like the pattern is different every time with sometimes more mines on the left side and sometimes more mines on the right side. I can currently not find any issues with this :-)
Alright, thanks for your effort. I'll check it out on my end later, and see if I can still reproduce it.
Alright, the results are in, and there in fact IS a bias to the left, on my machine at least. I've set up a test mission, and my conclusion is that ~2/3 mines will land to the left, rather than the expected ~1/2 mines.
Tested using the following mission:
How to use the mission:
Mines are counted by iterating over allMines, and comparing distance between two triggers, both distanced equally from the center line.
Screenshot of test results for reference:
Note: this was done on a newer version, v1.77.142613
Edit:
After looking at the screenshot, and think for half a second, I found an explanation for the phenomenon. You can see the dispensed mines gather in lines specific angles from the dispenser. It seems there are 14 angles, 5 being on the right and 9 on the left. If each angle has one mine fired, it would result in a 9/5 ratio to the left and right. That's actually way closer to the ratio I said earlier.
After skimming trough the config, I found this specific entry that I think may be of interest: configfile >> "CfgAmmo" >> "APERSMineDispenser_Ammo_Scripted" >> "submunitionConeType". It has been set to the following value:
submunitionConeType[] = {"randomupcone",14};. My guess at what the value does is divide a cone into 14 random angles.
The bug would be that the angles are always the same, be it due to the values being cached, a seed being reused, or some other reason.
Edit 2:
After another round of testing, specifically restarting Arma, I discovered that these angles are determined once per Arma session. Restarting Arma results in different angles, but the same in each session. I've tested this by using the mission above, firing a couple of times, then saving the mission, restart Arma, and resume.
My conclusions:
The pattern of mine dispensers are currently randomized, using a pattern that is reused in a session. The result for this is that if the pattern is unbalanced towards one side, it will always be so for that session.
I would expect behavior to be:
The mine dispenser would use a balanced pattern, this could achieved by either: