hedgewars/uGearsRender.pas
changeset 15630 c9fec197335a
parent 15624 adbd2bcf7159
child 15639 afeffdb4a712
equal deleted inserted replaced
15629:c8f672ae2371 15630:c9fec197335a
   313         exit;
   313         exit;
   314 
   314 
   315     // render crosshair
   315     // render crosshair
   316     if (CrosshairGear <> nil) and (Gear = CrosshairGear) then
   316     if (CrosshairGear <> nil) and (Gear = CrosshairGear) then
   317         begin
   317         begin
   318         if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtBlowTorch) then
   318         hogLR:= 1;
   319             hogLR:= CurAmmoGear^.Tag
   319         if IsHogFacingLeft(Gear) then
   320         else
   320             hogLR:= -1;
   321             begin
       
   322             hogLR:= 1;
       
   323             if IsHogFacingLeft(Gear) then
       
   324                 hogLR:= -1
       
   325             end;
       
   326         setTintAdd(true);
   321         setTintAdd(true);
   327         Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   322         Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   328         DrawTextureRotated(CrosshairTexture,
   323         DrawTextureRotated(CrosshairTexture,
   329                 12, 12, CrosshairX + WorldDx, CrosshairY + WorldDy, 0,
   324                 12, 12, CrosshairX + WorldDx, CrosshairY + WorldDy, 0,
   330                 hogLR * (Gear^.Angle * 180.0) / cMaxAngle);
   325                 hogLR * (Gear^.Angle * 180.0) / cMaxAngle);
   419     sign:= hwSign(Gear^.dX);
   414     sign:= hwSign(Gear^.dX);
   420     if IsHogFacingLeft(Gear) then
   415     if IsHogFacingLeft(Gear) then
   421         hogLR:= -1
   416         hogLR:= -1
   422     else
   417     else
   423         hogLR:= 1;
   418         hogLR:= 1;
   424     if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtBlowTorch) then
       
   425         hogLR:= CurAmmoGear^.Tag;
       
   426 
   419 
   427     if (Gear^.State and gstHHDeath) <> 0 then
   420     if (Gear^.State and gstHHDeath) <> 0 then
   428         begin
   421         begin
   429         DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos);
   422         DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos);
   430         Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   423         Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   667                     end;
   660                     end;
   668                     defaultPos:= false
   661                     defaultPos:= false
   669                     end;
   662                     end;
   670                 gtBlowTorch:
   663                 gtBlowTorch:
   671                     begin
   664                     begin
   672                     sign:= CurAmmoGear^.Tag;
       
   673                     DrawSpriteRotated(sprBlowTorch, ox + 8 * sign, oy - 2, sign, aangle);
   665                     DrawSpriteRotated(sprBlowTorch, ox + 8 * sign, oy - 2, sign, aangle);
   674                     DrawHedgehog(ox + 1, oy - 3,
   666                     DrawHedgehog(ox + 1, oy - 3,
   675                             sign,
   667                             sign,
   676                             3,
   668                             3,
   677                             HH^.visStepPos div 2,
   669                             HH^.visStepPos div 2,