hedgewars/uTeams.pas
changeset 4082 bfe14b38dad1
parent 4014 e9baae83370b
child 4098 40df542b5f62
equal deleted inserted replaced
4081:d4cb8f216724 4082:bfe14b38dad1
   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 throws Internal error 200502052 on fpc 2.5.1
   278 cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue;
   279 // see http://mantis.freepascal.org/view.php?id=17714
       
   280 cWindSpeedf:= SignAs(cWindSpeed,cWindSpeed).QWordValue / SignAs(_1,_1).QWordValue;
       
   281 if cWindSpeed.isNegative then
   279 if cWindSpeed.isNegative then
   282     CWindSpeedf := -cWindSpeedf;
   280     CWindSpeedf := -cWindSpeedf;
   283 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
   281 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
   284 g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
   282 g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
   285 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}
   283 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}