X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_map.pas;h=063c36b91e628b048502af9c5d2116116eaa3db6;hb=292e2b4e094da60e0e30512697dd275ff6d5de43;hp=60f1ee62e66605d3bd441719db1e02cdc075ecaa;hpb=9f8a16fcd7739f5ea3ea45242a761a0bbeb095fb;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_map.pas b/src/game/renders/opengl/r_map.pas index 60f1ee6..063c36b 100644 --- a/src/game/renders/opengl/r_map.pas +++ b/src/game/renders/opengl/r_map.pas @@ -276,8 +276,32 @@ implementation end; procedure r_Map_Free; - var i, j: Integer; d: TDirection; + var i, j, k, a: Integer; d: TDirection; begin + for i := 1 to WP_LAST do + begin + for j := 0 to W_POS_LAST do + begin + for k := 0 to W_ACT_LAST do + begin + if WeapTextures[i, j, k] <> nil then + WeapTextures[i, j, k].Free; + WeapTextures[i, j, k] := nil; + end; + end; + end; + for d := TDirection.D_LEFT to TDirection.D_RIGHT do + begin + for a := A_STAND to A_LAST do + begin + if Models[i].anim[d, a].base <> nil then + Models[i].anim[d, a].base.Free; + if Models[i].anim[d, a].mask <> nil then + Models[i].anim[d, a].mask.Free; + Models[i].anim[d, a].base := nil; + Models[i].anim[d, a].mask := nil; + end; + end; for i := MONSTER_DEMON to MONSTER_MAN do begin for j := 0 to ANIM_LAST do @@ -515,7 +539,7 @@ implementation a := pm.CurrentAnimation; d := pm.Direction; // TODO draw flag - if PlayerModelsArray[pm.id].HaveWeapon and not (pm.CurrentAnimation in [A_DIE1, A_DIE2, A_PAIN]) then + if PlayerModelsArray[pm.id].HaveWeapon and not (a in [A_DIE1, A_DIE2, A_PAIN]) then begin case a of A_SEEUP, A_ATTACKUP: pos := W_POS_UP;