hedgewars/uTeams.pas
changeset 4098 40df542b5f62
parent 4082 bfe14b38dad1
child 4099 af612377fcba
equal deleted inserted replaced
4097:1bd64b8156fb 4098:40df542b5f62
   273     end;
   273     end;
   274 
   274 
   275 ResetKbd;
   275 ResetKbd;
   276 
   276 
   277 cWindSpeed:= rndSign(GetRandom * 2 * cMaxWindSpeed);
   277 cWindSpeed:= rndSign(GetRandom * 2 * cMaxWindSpeed);
   278 cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue;
   278 // cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue throws 'Internal error 200502052' on Darwin
       
   279 // see http://mantis.freepascal.org/view.php?id=17714
       
   280 cWindSpeedf:= SignAs(cWindSpeed,cWindSpeed).QWordValue / SignAs(_1,_1).QWordValue;
   279 if cWindSpeed.isNegative then
   281 if cWindSpeed.isNegative then
   280     CWindSpeedf := -cWindSpeedf;
   282     CWindSpeedf := -cWindSpeedf;
   281 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
   283 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
   282 g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
   284 g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
   283 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}
   285 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}