Page MenuHomeFeedback Tracker

"Copy & Paste" error in BIS_fnc_sandstorm (l21/22)
Closed, ResolvedPublic

Description

_density = if (count _this > 1) then {_this select 1} else {0.07}; if (_density < 0) then {_density = 0.07};
_colorCoef = if (count _this > 2) then {_this select 2} else {1}; if (_colorCoef < 0) then {_density = 1};

_colorCoef can be negative causing color array to have negative values.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

R3vo created this task.Oct 29 2020, 6:58 PM
BIS_fnc_KK changed the task status from New to Assigned.
R3vo added a comment.EditedOct 30 2020, 2:13 AM

In addition to the above mentioned issue, the function will never execute this code block or use the fourth parameter.

//--- Newspapers
_result = if (_newspapers && false) then {
	_newsParams = [["\A3\Missions_PMC\gnews1.p3d", 1, 0, 1], "", "SpaceObject", 1, 5, [0, 0, 1], _velocity, 1, 1.25, 1, 0.2, [0,1,1,1,0], [[1,1,1,1]], [0.7], 1, 0, "", "", _obj];
	_newsRandom = [0, [30, 30, 0], [5, 5, 0], 2, 0.3, [0, 0, 0, 0], 10, 0];
	_newsCircle = [0.1, [1, 1, 0]];
	_newsInterval = 1;

	_times = "#particlesource" createVehicleLocal _pos;  
	_times setParticleParams _newsParams;
	_times setParticleRandom _newsRandom;
	_times setParticleCircle _newsCircle;
	_times setDropInterval _newsInterval;

	_newsParams set [0,["\A3\Missions_PMC\gnews2.p3d", 1, 0, 1]];
	_herald = "#particlesource" createVehicleLocal _pos;  
	_herald setParticleParams _newsParams;
	_herald setParticleRandom _newsRandom;
	_herald setParticleCircle _newsCircle;
	_herald setDropInterval _newsInterval;

	_newsParams set [0,["\A3\Missions_PMC\gnews3.p3d", 1, 0, 1]];
	_tribune = "#particlesource" createVehicleLocal _pos;  
	_tribune setParticleParams _newsParams;
	_tribune setParticleRandom _newsRandom;
	_tribune setParticleCircle _newsCircle;
	_tribune setDropInterval _newsInterval;

	[_ps,_times,_herald,_tribune]
} else {
	[_ps]
};

So it might be a good idea to just wrap it in a comment block. Function should then return [_ps].

next data update

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jun 20 2021, 8:10 PM
BIS_fnc_KK changed the task status from Assigned to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
R3vo closed this task as Resolved.Jun 28 2021, 4:27 PM
R3vo claimed this task.

Fixed.