diff --git a/README.md b/README.md
index 2160099ef..71ea2be2e 100644
--- a/README.md
+++ b/README.md
@@ -88,6 +88,7 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
| mp_buy_anywhere | 0 | 0 | 3 | When set, players can buy anywhere, not only in buyzones.
`0` disabled.
`1` both teams
`2` only Terrorists team
`3` only CT team |
| mp_give_player_c4 | 1 | 0 | 1 | Whether this map should spawn a C4 bomb for a player or not.
`0` disabled
`1` enabled |
| mp_weapons_allow_map_placed | 1 | 0 | 1 | When set, map weapons (located on the floor by map) will be shown.
`0` hide all map weapons.
`1` enabled
`NOTE`: Effect will work after round restart. |
+| mp_fadetoblack | 0 | 0 | 2 | Observer's screen will fade to black on kill event or permanent.
`0` No fade.
`1` Fade to black and won't be able to watch anybody.
`2` fade to black only on kill moment. |
## How to install zBot for CS 1.6?
diff --git a/dist/game.cfg b/dist/game.cfg
index 6cecd84e7..7199c7578 100644
--- a/dist/game.cfg
+++ b/dist/game.cfg
@@ -374,3 +374,11 @@ mp_give_player_c4 1
//
// Default value: "1"
mp_weapons_allow_map_placed 1
+
+// Observer's screen will fade to black on kill event or permanent.
+// 0 - No fade
+// 1 - Fade to black and won't be able to watch anybody
+// 2 - fade to black only on kill moment.
+//
+// Default value: "0"
+mp_fadetoblack 0
diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp
index 79a204f62..4af41c6f2 100644
--- a/regamedll/dlls/player.cpp
+++ b/regamedll/dlls/player.cpp
@@ -2063,6 +2063,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib)
pev->effects &= ~EF_DIMLIGHT;
#endif
+#ifndef REGAMEDLL_ADD
if (fadetoblack.value == 0.0)
{
pev->iuser1 = OBS_CHASE_FREE;
@@ -2078,6 +2079,53 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib)
{
UTIL_ScreenFade(this, Vector(0, 0, 0), 3, 3, 255, (FFADE_OUT | FFADE_STAYOUT));
}
+#else
+ switch ((int)fadetoblack.value)
+ {
+ default:
+ {
+ pev->iuser1 = OBS_CHASE_FREE;
+ pev->iuser2 = ENTINDEX(edict());
+ pev->iuser3 = ENTINDEX(ENT(pevAttacker));
+
+ m_hObserverTarget = UTIL_PlayerByIndexSafe(pev->iuser3);
+
+ MESSAGE_BEGIN(MSG_ONE, gmsgADStop, nullptr, pev);
+ MESSAGE_END();
+
+ break;
+ }
+ case 1:
+ {
+ UTIL_ScreenFade(this, Vector(0, 0, 0), 3, 3, 255, (FFADE_OUT | FFADE_STAYOUT));
+
+ break;
+ }
+ case 2:
+ {
+ pev->iuser1 = OBS_CHASE_FREE;
+ pev->iuser2 = ENTINDEX(edict());
+ pev->iuser3 = ENTINDEX(ENT(pevAttacker));
+
+ m_hObserverTarget = UTIL_PlayerByIndexSafe(pev->iuser3);
+
+ MESSAGE_BEGIN(MSG_ONE, gmsgADStop, nullptr, pev);
+ MESSAGE_END();
+
+ for (int i = 1; i <= gpGlobals->maxClients; i++)
+ {
+ CBasePlayer* pObserver = UTIL_PlayerByIndex(i);
+
+ if (pObserver == this || pObserver && pObserver->IsObservingPlayer(this))
+ {
+ UTIL_ScreenFade(pObserver, Vector(0, 0, 0), 1, 4, 255, (FFADE_OUT));
+ }
+ }
+
+ break;
+ }
+ }
+#endif // REGAMEDLL_ADD
SetScoreboardAttributes();