index e37e2e448b5115c204097f6c81c5467e5e01d5ae..57e3ce96c800185c10684cacf6aac3d6ebaf0473 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
-{$MODE DELPHI}
+{$INCLUDE ../shared/a_modes.inc}
unit g_monsters;
interface
function Live(): Boolean;
procedure SetHealth(aH: Integer);
procedure Push(vx, vy: Integer);
- function Damage(Damage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
+ function Damage(aDamage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
function Heal(Value: Word): Boolean;
procedure BFGHit();
procedure Update();
procedure ClientUpdate();
- procedure ClientAttack(wx, wy, tx, ty: Integer);
+ procedure ClientAttack(wx, wy, atx, aty: Integer);
procedure SetDeadAnim;
procedure Draw();
procedure WakeUp();
vilefire := nil;
end;
-function TMonster.Damage(Damage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
+function TMonster.Damage(aDamage: Word; VelX, VelY: Integer; SpawnerUID: Word; t: Byte): Boolean;
var
c, it: Integer;
p: TPlayer;
// Ðîáîòó óðîíà íåò:
if FMonsterType = MONSTER_ROBO then
- Damage := 0;
+ aDamage := 0;
// Íàíîñèì óðîí:
- if g_Game_IsServer then Dec(FHealth, Damage);
+ if g_Game_IsServer then Dec(FHealth, aDamage);
// Óñèëèâàåì áîëü ìîíñòðà îò óðîíà:
if FPain = 0 then
FPain := 3;
- FPain := FPain+Damage;
+ FPain := FPain+aDamage;
// Åñëè áîëü ñóùåñòâåííàÿ, òî ìåíÿåì ñîñòîÿíèå íà áîëåâîå:
if FState <> STATE_PAIN then
// Åñëè ðàçðåøåíà êðîâü - ñîçäàåì áðûçãè êðîâè:
if (gBloodCount > 0) then
begin
- c := Min(Damage, 200);
- c := c*gBloodCount - (Damage div 4) + Random(c div 2);
+ c := Min(aDamage, 200);
+ c := c*gBloodCount - (aDamage div 4) + Random(c div 2);
if (VelX = 0) and (VelY = 0) then
MakeBloodSimple(c)
FAnim[FCurAnim, FDirection].Update();
end;
-procedure TMonster.ClientAttack(wx, wy, tx, ty: Integer);
+procedure TMonster.ClientAttack(wx, wy, atx, aty: Integer);
begin
case FMonsterType of
MONSTER_ZOMBY:
g_Player_CreateShell(wx, wy, 0, -2, SHELL_BULLET);
end;
MONSTER_IMP:
- g_Weapon_ball1(wx, wy, tx, ty, FUID);
+ g_Weapon_ball1(wx, wy, atx, aty, FUID);
MONSTER_CYBER:
- g_Weapon_rocket(wx, wy, tx, ty, FUID);
+ g_Weapon_rocket(wx, wy, atx, aty, FUID);
MONSTER_SKEL:
- g_Weapon_revf(wx, wy, tx, ty, FUID, FTargetUID);
+ g_Weapon_revf(wx, wy, atx, aty, FUID, FTargetUID);
MONSTER_BSP:
- g_Weapon_aplasma(wx, wy, tx, ty, FUID);
+ g_Weapon_aplasma(wx, wy, atx, aty, FUID);
MONSTER_ROBO:
- g_Weapon_plasma(wx, wy, tx, ty, FUID);
+ g_Weapon_plasma(wx, wy, atx, aty, FUID);
MONSTER_MANCUB:
- g_Weapon_manfire(wx, wy, tx, ty, FUID);
+ g_Weapon_manfire(wx, wy, atx, aty, FUID);
MONSTER_BARON, MONSTER_KNIGHT:
- g_Weapon_ball7(wx, wy, tx, ty, FUID);
+ g_Weapon_ball7(wx, wy, atx, aty, FUID);
MONSTER_CACO:
- g_Weapon_ball2(wx, wy, tx, ty, FUID);
+ g_Weapon_ball2(wx, wy, atx, aty, FUID);
end;
end;