DEADSOFTWARE

Player model: Add new die level 5 for corpse slop
authorbinarymaster <x86corez@gmail.com>
Mon, 6 Mar 2017 00:03:46 +0000 (03:03 +0300)
committerbinarymaster <x86corez@gmail.com>
Mon, 6 Mar 2017 00:03:46 +0000 (03:03 +0300)
src/game/g_player.pas
src/game/g_playermodel.pas

index c63aad413e5786b8930e874fe4ff94a038f39a90..a99e5b069ef21ba255f7f4a4e08b2fe6d1b38d3c 100644 (file)
@@ -5668,8 +5668,9 @@ begin
         g_Player_CreateGibs(FObj.X+FObj.Rect.X+(FObj.Rect.Width div 2),
                             FObj.Y+FObj.Rect.Y+(FObj.Rect.Height div 2),
                             FModelName, FColor);
+        // Çâóê ìÿñà îò òðóïà:
         pm := g_PlayerModel_Get(FModelName);
-        pm.PlaySound(MODELSOUND_DIE, 3, FObj.X, FObj.Y);
+        pm.PlaySound(MODELSOUND_DIE, 5, FObj.X, FObj.Y);
         pm.Free;
       end;
     end
index 9b67c0033f19a42d0fff2d793356da90851090f5..b5978c926654f1c705cede3e42f2b2d7c1bf55e0 100644 (file)
@@ -798,7 +798,7 @@ begin
   end
   else
   begin
-    if (Level in [2, 3]) and (FSlopSound > 0) then
+    if (Level in [2, 3, 5]) and (FSlopSound > 0) then
     begin
       g_Sound_PlayExAt('SOUND_MONSTER_SLOP', X, Y);
       if FSlopSound = 1 then
@@ -815,6 +815,12 @@ begin
         SetLength(TempArray, Length(TempArray)+1);
         TempArray[High(TempArray)] := FDieSounds[a].ID;
       end;
+    if (TempArray = nil) and (Level = 5) then
+    begin
+      g_Sound_PlayExAt('SOUND_MONSTER_SLOP', X, Y);
+      Result := True;
+      Exit;
+    end;
   end;
 
   if TempArray = nil then Exit;