diff --git a/datasrc/content.py b/datasrc/content.py index 3f6676e40..f65f629a1 100644 --- a/datasrc/content.py +++ b/datasrc/content.py @@ -450,6 +450,8 @@ container.sprites.Add(Sprite("hud_no_hammer_hit", set_hud, 6,2,2,2)) container.sprites.Add(Sprite("hud_no_shotgun_hit", set_hud, 8,2,2,2)) container.sprites.Add(Sprite("hud_no_grenade_hit", set_hud, 10,2,2,2)) container.sprites.Add(Sprite("hud_no_laser_hit", set_hud, 12,2,2,2)) +container.sprites.Add(Sprite("hud_deep_frozen", set_hud, 0,4,2,2)) +container.sprites.Add(Sprite("hud_live_frozen", set_hud, 2,4,2,2)) container.sprites.Add(Sprite("hud_teleport_grenade", set_hud, 4,4,2,2)) container.sprites.Add(Sprite("hud_teleport_gun", set_hud, 6,4,2,2)) container.sprites.Add(Sprite("hud_teleport_laser", set_hud, 8,4,2,2)) diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index 4e1b66453..f62c8a6dd 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -819,7 +819,9 @@ void CHud::PreparePlayerStateQuads() m_NoGrenadeHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f); m_NoLaserHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f); - // Quads for displaying dummy actions + // Quads for displaying dummy actions and freeze status + m_DeepFrozenOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f); + m_LiveFrozenOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f); m_DummyHammerOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f); m_DummyCopyOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f); @@ -1016,7 +1018,6 @@ void CHud::RenderPlayerState(const int ClientID) HasCapabilities = true; Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudTeleportLaser); Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_TeleportLaserOffset, x, y); - x += 12; } // render prohibited capabilities @@ -1073,15 +1074,26 @@ void CHud::RenderPlayerState(const int ClientID) HasProhibitedCapabilities = true; Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoLaserHit); Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoLaserHitOffset, x, y); - x += 12; } - // render dummy actions + // render dummy actions and freeze state x = 5; if(HasProhibitedCapabilities) { y += 12; } + if(pCharacter->m_DeepFrozen) + { + Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudDeepFrozen); + Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_DeepFrozenOffset, x, y); + x += 12; + } + if(pCharacter->m_LiveFrozen) + { + Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudLiveFrozen); + Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_LiveFrozenOffset, x, y); + x += 12; + } if(g_Config.m_ClDummyHammer) { Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudDummyHammer); @@ -1092,7 +1104,6 @@ void CHud::RenderPlayerState(const int ClientID) { Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudDummyCopy); Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_DummyCopyOffset, x, y); - x += 12; } } diff --git a/src/game/client/components/hud.h b/src/game/client/components/hud.h index 33577b688..d89968a3b 100644 --- a/src/game/client/components/hud.h +++ b/src/game/client/components/hud.h @@ -121,6 +121,8 @@ private: int m_NoShotgunHitOffset; int m_NoGrenadeHitOffset; int m_NoLaserHitOffset; + int m_DeepFrozenOffset; + int m_LiveFrozenOffset; int m_DummyHammerOffset; int m_DummyCopyOffset; int m_NinjaBarFullLeftOffset; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 39f6c84fb..3a5046295 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -3020,6 +3020,8 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir) Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoShotgunHit); Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoGrenadeHit); Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoLaserHit); + Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudDeepFrozen); + Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudLiveFrozen); Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudTeleportGrenade); Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudTeleportGun); Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudTeleportLaser); @@ -3071,6 +3073,8 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir) m_HudSkin.m_SpriteHudNoShotgunHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_SHOTGUN_HIT]); m_HudSkin.m_SpriteHudNoGrenadeHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_GRENADE_HIT]); m_HudSkin.m_SpriteHudNoLaserHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_LASER_HIT]); + m_HudSkin.m_SpriteHudDeepFrozen = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_DEEP_FROZEN]); + m_HudSkin.m_SpriteHudLiveFrozen = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_LIVE_FROZEN]); m_HudSkin.m_SpriteHudTeleportGrenade = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_TELEPORT_GRENADE]); m_HudSkin.m_SpriteHudTeleportGun = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_TELEPORT_GUN]); m_HudSkin.m_SpriteHudTeleportLaser = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_TELEPORT_LASER]); diff --git a/src/game/client/gameclient.h b/src/game/client/gameclient.h index 03a590145..3e9f332f5 100644 --- a/src/game/client/gameclient.h +++ b/src/game/client/gameclient.h @@ -660,6 +660,8 @@ public: IGraphics::CTextureHandle m_SpriteHudNoShotgunHit; IGraphics::CTextureHandle m_SpriteHudNoGrenadeHit; IGraphics::CTextureHandle m_SpriteHudNoLaserHit; + IGraphics::CTextureHandle m_SpriteHudDeepFrozen; + IGraphics::CTextureHandle m_SpriteHudLiveFrozen; IGraphics::CTextureHandle m_SpriteHudTeleportGrenade; IGraphics::CTextureHandle m_SpriteHudTeleportGun; IGraphics::CTextureHandle m_SpriteHudTeleportLaser;