X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fopengl%2Fr_player.pas;h=1beb1e4d78269e1aa8fdb423518bf708f6e43d2e;hb=9f8a16fcd7739f5ea3ea45242a761a0bbeb095fb;hp=6204da3b78fe1c5b004b37d75c0a624f9335917a;hpb=06becc2e3715be961a5ce32accc4e97a4df28804;p=d2df-sdl.git diff --git a/src/game/opengl/r_player.pas b/src/game/opengl/r_player.pas index 6204da3..1beb1e4 100644 --- a/src/game/opengl/r_player.pas +++ b/src/game/opengl/r_player.pas @@ -452,12 +452,12 @@ begin 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