summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1fadc4)
raw | patch | inline | side by side (parent: c1fadc4)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 13 Apr 2022 18:15:29 +0000 (21:15 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 08:24:14 +0000 (11:24 +0300) |
src/game/g_player.pas | patch | blob | history | |
src/game/opengl/r_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index ea2aea5d3dba7f8568d18fa7f17e894a745dc984..312f186db0e7bca4cd4823bdcec36a7dd2592537 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
FSavedStateNum: Integer;
FModel: TPlayerModel;
- FPunchAnim: TAnimationState;
+ FPunchAnim: TAnimState;
FActionPrior: Byte;
FActionAnim: Byte;
FActionForce: Boolean;
property Berserk: Integer read FBerserk;
property Pain: Integer read FPain;
property Pickup: Integer read FPickup;
- property PunchAnim: TAnimationState read FPunchAnim write FPunchAnim;
+ property PunchAnim: TAnimState read FPunchAnim write FPunchAnim;
property SpawnInvul: Integer read FSpawnInvul;
property Ghost: Boolean read FGhost;
FNetTime := 0;
FWaitForFirstSpawn := false;
- FPunchAnim := TAnimationState.Create(False, 1, 4);
+ FPunchAnim := TAnimState.Create(False, 1, 4);
FPunchAnim.Disable;
resetWeaponQueue();
FJetSoundOn.Free();
FJetSoundOff.Free();
FModel.Free();
- FPunchAnim.Free();
+ FPunchAnim.Invalidate;
inherited;
end;
index 6204da3b78fe1c5b004b37d75c0a624f9335917a..1beb1e4d78269e1aa8fdb423518bf708f6e43d2e 100644 (file)
else
Mirror := TMirrorType.Horizontal;
- if p.PunchAnim.enabled then
+ if p.PunchAnim.IsValid() and p.PunchAnim.enabled then
begin
if p.FKeys[KEY_DOWN].Pressed then ID := PunchFrames[R_BERSERK in p.FRulez, 2]
else if p.FKeys[KEY_UP].Pressed then ID := PunchFrames[R_BERSERK in p.FRulez, 1]
else ID := PunchFrames[R_BERSERK in p.FRulez, 0];
- r_AnimationState_Draw(ID, p.PunchAnim, fX + IfThen(p.Direction = TDirection.D_LEFT, 15 - p.Obj.Rect.X, p.Obj.Rect.X - 15), fY + fSlope + p.Obj.Rect.Y - 11, 0, Mirror, False);
+ r_AnimState_Draw(ID, p.PunchAnim, fX + IfThen(p.Direction = TDirection.D_LEFT, 15 - p.Obj.Rect.X, p.Obj.Rect.X - 15), fY + fSlope + p.Obj.Rect.Y - 11, 0, Mirror, False);
end;
if (p.FMegaRulez[MR_INVUL] > gTime) and ((gPlayerDrawn <> p) or (p.SpawnInvul >= gTime)) then