1377 else if Gear^.Health <> 0 then |
1377 else if Gear^.Health <> 0 then |
1378 DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle) |
1378 DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle) |
1379 else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
1379 else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); |
1380 end; |
1380 end; |
1381 gtAirMine: |
1381 gtAirMine: |
|
1382 // render air mine based on its state: |
|
1383 // frozen |
1382 if (Gear^.State and gstFrozen <> 0) then |
1384 if (Gear^.State and gstFrozen <> 0) then |
|
1385 // frozen air mine sprite |
1383 DrawSprite(sprFrozenAirMine, x-16, y-16, 0) |
1386 DrawSprite(sprFrozenAirMine, x-16, y-16, 0) |
|
1387 // stunned (after being shot) |
1384 else if (Gear^.Tag <> 0) then |
1388 else if (Gear^.Tag <> 0) then |
|
1389 // sparks animation |
1385 DrawSprite(sprAirMine, x-16, y-16, 16 + ((RealTicks div 50 + Gear^.Uid) mod 16)) |
1390 DrawSprite(sprAirMine, x-16, y-16, 16 + ((RealTicks div 50 + Gear^.Uid) mod 16)) |
1386 else if (Gear^.State and gstTmpFlag = 0) then // mine is inactive |
1391 // inactive / initialization phase (shortly after launched by hog) |
1387 begin |
1392 else if (Gear^.State and gstTmpFlag = 0) then |
1388 if (Gear^.State and gstTmpFlag = 0) then Tint(150,150,150,255); |
1393 begin |
|
1394 // dark air mine, signal lamp off |
|
1395 Tint(150,150,150,255); |
1389 DrawSprite(sprAirMine, x-16, y-16, 15); |
1396 DrawSprite(sprAirMine, x-16, y-16, 15); |
1390 untint |
1397 untint |
1391 end |
1398 end |
1392 else if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then // mine is chasing a hog |
1399 // actively chasing a hog |
|
1400 else if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then |
|
1401 // signal lamp rapidly flashes |
1393 DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 25 + Gear^.Uid) mod 16) |
1402 DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 25 + Gear^.Uid) mod 16) |
1394 else if Gear^.State and gstChooseTarget <> 0 then // mine is seeking for hogs |
1403 // seeking for hogs |
1395 DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 125 + Gear^.Uid) mod 16) |
1404 else if Gear^.State and gstChooseTarget <> 0 then |
|
1405 // signal lamp on |
|
1406 DrawSprite(sprAirMine, x-16, y-16, 3) |
|
1407 // active, but not seeking for hogs |
1396 else |
1408 else |
1397 DrawSprite(sprAirMine, x-16, y-16, 4); // mine is active but not seeking |
1409 // signal lamp off |
|
1410 DrawSprite(sprAirMine, x-16, y-16, 15); |
1398 |
1411 |
1399 gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
1412 gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then |
1400 DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) |
1413 DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) |
1401 else if Gear^.Health <> 0 then |
1414 else if Gear^.Health <> 0 then |
1402 DrawSpriteRotated(sprSMineOn, x, y, 0, Gear^.DirAngle) |
1415 DrawSpriteRotated(sprSMineOn, x, y, 0, Gear^.DirAngle) |