mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
added team0mode indicator
This commit is contained in:
parent
2dbcb9795a
commit
9bbe238159
BIN
data/hud.png
BIN
data/hud.png
Binary file not shown.
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 74 KiB |
|
@ -449,6 +449,7 @@ container.sprites.Add(Sprite("hud_practice_mode", set_hud, 4,6,2,2))
|
|||
container.sprites.Add(Sprite("hud_dummy_hammer", set_hud, 6,6,2,2))
|
||||
container.sprites.Add(Sprite("hud_dummy_copy", set_hud, 8,6,2,2))
|
||||
container.sprites.Add(Sprite("hud_lock_mode", set_hud, 10,6,2,2))
|
||||
container.sprites.Add(Sprite("hud_team0_mode", set_hud, 12,6,2,2))
|
||||
|
||||
container.sprites.Add(Sprite("part_snowflake", set_extras, 0,0,2,2))
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ CharacterFlags = ["SOLO", "JETPACK", "COLLISION_DISABLED", "ENDLESS_HOOK", "ENDL
|
|||
"HAMMER_HIT_DISABLED", "SHOTGUN_HIT_DISABLED", "GRENADE_HIT_DISABLED", "LASER_HIT_DISABLED", "HOOK_HIT_DISABLED",
|
||||
"TELEGUN_GUN", "TELEGUN_GRENADE", "TELEGUN_LASER",
|
||||
"WEAPON_HAMMER", "WEAPON_GUN", "WEAPON_SHOTGUN", "WEAPON_GRENADE", "WEAPON_LASER", "WEAPON_NINJA",
|
||||
"MOVEMENTS_DISABLED", "IN_FREEZE", "PRACTICE_MODE", "LOCK_MODE"]
|
||||
"MOVEMENTS_DISABLED", "IN_FREEZE", "PRACTICE_MODE", "LOCK_MODE", "TEAM0_MODE"]
|
||||
GameInfoFlags = [
|
||||
"TIMESCORE", "GAMETYPE_RACE", "GAMETYPE_FASTCAP", "GAMETYPE_FNG",
|
||||
"GAMETYPE_DDRACE", "GAMETYPE_DDNET", "GAMETYPE_BLOCK_WORLDS",
|
||||
|
|
|
@ -752,6 +752,7 @@ void CHud::PreparePlayerStateQuads()
|
|||
// Quads for displaying team modes
|
||||
m_PracticeModeOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
|
||||
m_LockModeOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
|
||||
m_Team0ModeOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
|
||||
}
|
||||
|
||||
void CHud::RenderPlayerState(const int ClientId)
|
||||
|
@ -1002,6 +1003,12 @@ void CHud::RenderPlayerState(const int ClientId)
|
|||
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_PracticeModeOffset, x, y);
|
||||
x += 12;
|
||||
}
|
||||
if(m_pClient->m_Snap.m_aCharacters[ClientId].m_HasExtendedDisplayInfo && m_pClient->m_Snap.m_aCharacters[ClientId].m_ExtendedData.m_Flags & CHARACTERFLAG_TEAM0_MODE)
|
||||
{
|
||||
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudTeam0Mode);
|
||||
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_Team0ModeOffset, x, y);
|
||||
x += 12;
|
||||
}
|
||||
if(pCharacter->m_DeepFrozen)
|
||||
{
|
||||
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudDeepFrozen);
|
||||
|
|
|
@ -135,6 +135,7 @@ private:
|
|||
int m_DummyHammerOffset;
|
||||
int m_DummyCopyOffset;
|
||||
int m_PracticeModeOffset;
|
||||
int m_Team0ModeOffset;
|
||||
int m_LockModeOffset;
|
||||
};
|
||||
|
||||
|
|
|
@ -3308,6 +3308,7 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir)
|
|||
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudTeleportLaser);
|
||||
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudPracticeMode);
|
||||
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudLockMode);
|
||||
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudTeam0Mode);
|
||||
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudDummyHammer);
|
||||
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudDummyCopy);
|
||||
m_HudSkinLoaded = false;
|
||||
|
@ -3367,6 +3368,7 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir)
|
|||
m_HudSkin.m_SpriteHudTeleportLaser = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_TELEPORT_LASER]);
|
||||
m_HudSkin.m_SpriteHudPracticeMode = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_PRACTICE_MODE]);
|
||||
m_HudSkin.m_SpriteHudLockMode = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_LOCK_MODE]);
|
||||
m_HudSkin.m_SpriteHudTeam0Mode = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_TEAM0_MODE]);
|
||||
m_HudSkin.m_SpriteHudDummyHammer = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_DUMMY_HAMMER]);
|
||||
m_HudSkin.m_SpriteHudDummyCopy = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_DUMMY_COPY]);
|
||||
|
||||
|
|
|
@ -707,6 +707,7 @@ public:
|
|||
IGraphics::CTextureHandle m_SpriteHudTeleportLaser;
|
||||
IGraphics::CTextureHandle m_SpriteHudPracticeMode;
|
||||
IGraphics::CTextureHandle m_SpriteHudLockMode;
|
||||
IGraphics::CTextureHandle m_SpriteHudTeam0Mode;
|
||||
IGraphics::CTextureHandle m_SpriteHudDummyHammer;
|
||||
IGraphics::CTextureHandle m_SpriteHudDummyCopy;
|
||||
};
|
||||
|
|
|
@ -1274,6 +1274,10 @@ void CCharacter::Snap(int SnappingClient)
|
|||
{
|
||||
pDDNetCharacter->m_Flags |= CHARACTERFLAG_LOCK_MODE;
|
||||
}
|
||||
if(Teams()->TeamFlock(Team()))
|
||||
{
|
||||
pDDNetCharacter->m_Flags |= CHARACTERFLAG_TEAM0_MODE;
|
||||
}
|
||||
pDDNetCharacter->m_TargetX = m_Core.m_Input.m_TargetX;
|
||||
pDDNetCharacter->m_TargetY = m_Core.m_Input.m_TargetY;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue