diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 9e410bfd95016f1df3d25c7ef1191127eede250c..7499754329dac902458811598b024c4a3ebf2aef 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
{$IFDEF ENABLE_HOLMES}
g_holmes,
{$ENDIF}
{$IFDEF ENABLE_HOLMES}
g_holmes,
{$ENDIF}
- e_log, g_map, g_items, g_console, g_gfx, Math,
+ e_log, g_map, g_items, g_console, g_gfx, Math, r_textures, r_animations, r_gfx,
g_options, g_triggers, g_menu, g_game, g_grid, e_res,
wadreader, g_monsters, CONFIG, g_language,
g_net, g_netmsg,
g_options, g_triggers, g_menu, g_game, g_grid, e_res,
wadreader, g_monsters, CONFIG, g_language,
g_net, g_netmsg,
var
RespawnPoint: TRespawnPoint;
a, b, c: Byte;
var
RespawnPoint: TRespawnPoint;
a, b, c: Byte;
- Anim: TAnimation;
- ID: DWORD;
begin
FSlopeOld := 0;
FIncCamOld := 0;
begin
FSlopeOld := 0;
FIncCamOld := 0;
// Анимация возрождения:
if (not gLoadGameMode) and (not Silent) then
// Анимация возрождения:
if (not gLoadGameMode) and (not Silent) then
- if g_Frames_Get(ID, 'FRAMES_TELEPORT') then
- begin
- Anim := TAnimation.Create(ID, False, 3);
- g_GFX_OnceAnim(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
- FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, Anim);
- Anim.Free();
- end;
+ r_GFX_OnceAnim(
+ R_GFX_TELEPORT_FAST,
+ FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
+ FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32
+ );
FSpectator := False;
FGhost := False;
FSpectator := False;
FGhost := False;
end;
function TPlayer.TeleportTo(X, Y: Integer; silent: Boolean; dir: Byte): Boolean;
end;
function TPlayer.TeleportTo(X, Y: Integer; silent: Boolean; dir: Byte): Boolean;
-var
- Anim: TAnimation;
- ID: DWORD;
begin
Result := False;
begin
Result := False;
FJustTeleported := True;
FJustTeleported := True;
- Anim := nil;
if not silent then
begin
if not silent then
begin
- if g_Frames_Get(ID, 'FRAMES_TELEPORT') then
- begin
- Anim := TAnimation.Create(ID, False, 3);
- end;
-
g_Sound_PlayExAt('SOUND_GAME_TELEPORT', FObj.X, FObj.Y);
g_Sound_PlayExAt('SOUND_GAME_TELEPORT', FObj.X, FObj.Y);
- g_GFX_OnceAnim(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
- FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, Anim);
+ r_GFX_OnceAnim(
+ R_GFX_TELEPORT_FAST,
+ FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
+ FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, 1,
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, 1,
end;
end;
end;
end;
- if not silent and (Anim <> nil) then
+ if not silent then
begin
begin
- g_GFX_OnceAnim(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
- FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, Anim);
- Anim.Free();
-
+ r_GFX_OnceAnim(
+ R_GFX_TELEPORT_FAST,
+ FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
+ FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, 0,
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(FObj.X+PLAYER_RECT.X+(PLAYER_RECT.Width div 2)-32,
FObj.Y+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)-32, 0,
end;
procedure TPlayer.FlySmoke(Times: DWORD = 1);
end;
procedure TPlayer.FlySmoke(Times: DWORD = 1);
-var
- id, i: DWORD;
- Anim: TAnimation;
+ var i: DWORD;
begin
if (Random(5) = 1) and (Times = 1) then
Exit;
begin
if (Random(5) = 1) and (Times = 1) then
Exit;
Exit;
end;
Exit;
end;
- if g_Frames_Get(id, 'FRAMES_SMOKE') then
+ for i := 1 to Times do
begin
begin
- for i := 1 to Times do
- begin
- Anim := TAnimation.Create(id, False, 3);
- Anim.Alpha := 150;
- g_GFX_OnceAnim(Obj.X+Obj.Rect.X+Random(Obj.Rect.Width+Times*2)-(Anim.Width div 2),
- Obj.Y+Obj.Rect.Height-4+Random(8+Times*2), Anim, ONCEANIM_SMOKE);
- Anim.Free();
- end;
+ r_GFX_OnceAnim(
+ R_GFX_SMOKE_TRANS,
+ Obj.X+Obj.Rect.X+Random(Obj.Rect.Width+Times*2)-(R_GFX_SMOKE_WIDTH div 2),
+ Obj.Y+Obj.Rect.Height-4+Random(8+Times*2)
+ );
end;
end;
procedure TPlayer.OnFireFlame(Times: DWORD = 1);
end;
end;
procedure TPlayer.OnFireFlame(Times: DWORD = 1);
-var
- id, i: DWORD;
- Anim: TAnimation;
+ var i: DWORD;
begin
if (Random(10) = 1) and (Times = 1) then
Exit;
begin
if (Random(10) = 1) and (Times = 1) then
Exit;
- if g_Frames_Get(id, 'FRAMES_FLAME') then
+ for i := 1 to Times do
begin
begin
- for i := 1 to Times do
- begin
- Anim := TAnimation.Create(id, False, 3);
- Anim.Alpha := 0;
- g_GFX_OnceAnim(Obj.X+Obj.Rect.X+Random(Obj.Rect.Width+Times*2)-(Anim.Width div 2),
- Obj.Y+8+Random(8+Times*2), Anim, ONCEANIM_SMOKE);
- Anim.Free();
- end;
+ r_GFX_OnceAnim(
+ R_GFX_FLAME,
+ Obj.X+Obj.Rect.X+Random(Obj.Rect.Width+Times*2)-(R_GFX_FLAME_WIDTH div 2),
+ Obj.Y+8+Random(8+Times*2)
+ );
end;
end;
end;
end;