Page MenuHomeFeedback Tracker

BIS_fnc_addRespawnPosition with marker lead to spawn positions outside marker area
New, NormalPublic

Description

If i add a respawn position by BIS_fnc_addRespawnPosition with a marker as position param, i spawn outside the marker area. The distance to the marker is greater if the marker size increase. And there is another bug which exist as long as the new respawn menue. A error massage occurs if i use a marker which i add in the editor.

On Screen Error Massage: Picture Ellipse not found
Error Massage in Logfile: Warning Message: Cannot load texture ellipse.paa.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce
  • Activate Respawn Menue Position
  • Add Respawn Position
Additional Information

Testet in hostet MP Game and dedicated server environment.

Event Timeline

PhilipJFry edited Additional Information. (Show Details)May 19 2017, 12:50 PM
PhilipJFry changed Category from General to Scripting.Jul 7 2017, 2:12 PM

I think i found the reason of this behavior in BIS_fnc_moveToRespawnPosition.sqf, Line 115.

foreach ($list as $item) {
//--- marker
if (_this isEqualType "") exitWith
{
	private _markerPos = markerPos _this; //--- get spawn position now, to make it more robust in scheduled
			
	if (_markerPos isEqualTo [0,0,0]) throw "position is undefined or blacklisted"; //--- blacklisted [0,0,0] or null marker
			
	markerSize _this params ["_markerX", "_markerY"];
	_unit setDir markerDir _this;
	_unit setVehiclePosition [_markerPos, [], (_markerX * _markerY) / 2, "NONE"];
			
	true
};
  work_miracles($item);
}

For example, if you have a circle shaped marker and set the markersize with "marker" setMarkerSize [10,10], you have a marker with radius 10 meters so the diameter will be 20 meters. The placement radius in the function will be calculated by (_markerX * _markerY) / 2. For a circle _markerX = _markerY = 10 (radius). The placement radius is (10 * 10) / 2 = 50 meters. Marker radius 10, placement radius 50.