Page MenuHomeFeedback Tracker

Script to determine probability for a fireplace to light is broken
Closed, ResolvedPublic

Description

server_data.pbo\DZ\server\scripts\players\player_igniteFireplace.sqf contains the following SQF script to determine if wind should blow out the match before you can light a fire.

----------

_windStrength = (wind select 0) + (wind select 1) + (wind select 2);
_probability = 0;

//set probability to ignite against wind
switch true do
{
case (_windStrength > 13.9):
{

		_probability = 0.25;

};
case (_windStrength > 10.8):
{

		_probability = 0.5;

};
case (_windStrength > 5.4):
{

		_probability = 0.7;

};
case (_windStrength > 1.5):
{

		_probability = 0.8;

};
case (_windStrength > 0):
{

		_probability = 1;

};
};

----------

If _windStrength is exactly 0, then _probability remains at 0, so there is no chance for the fire to ignite when there is no wind to stop it.

If the values in the wind array are not normalised (which they probably aren't since the wind will have direction) then _windStrength can be a negative number, again resulting in 0% chance for the fire to light in even the lightest of winds, or possibly resulting in a low value for extremely high winds making the chance to light high when it should be very low.

Details

Legacy ID
2418286188
Severity
None
Resolution
Fixed
Reproducibility
N/A

Event Timeline

Qauntum set Category to category:items.Jun 21 2014, 3:02 PM
Qauntum set Reproducibility to N/A.
Qauntum set Severity to None.
Qauntum set Resolution to Fixed.
Qauntum set Legacy ID to 2418286188.May 8 2016, 6:40 PM

Hello,

this issue has been fixed in the last game update.

Thank you for bringing it to our attention!