mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-08 06:12:17 -05:00
HUD: character name displayed on all maps
HUD: character name fades out on all maps HUD: make character name duration start once character name is visible
This commit is contained in:
parent
1045296bb7
commit
7e99423e58
@ -27,8 +27,8 @@
|
|||||||
* Timer displayed on top right of screen
|
* Timer displayed on top right of screen
|
||||||
* Health bar displayed on bottom left of screen
|
* Health bar displayed on bottom left of screen
|
||||||
* Zone name displayed on bottom left of screen
|
* Zone name displayed on bottom left of screen
|
||||||
* Added proper game mode and map name to scoreboard
|
* Character name displayed on all maps
|
||||||
* Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife
|
* Character name fades out after 15 seconds on all maps
|
||||||
* Moved points display, grenade icons, and keyboard & mouse dpad icons to their positions from Origins on all maps
|
* Moved points display, grenade icons, and keyboard & mouse dpad icons to their positions from Origins on all maps
|
||||||
* Moved afterlife display to the right of points display
|
* Moved afterlife display to the right of points display
|
||||||
* Weapon name is all capitalized on all maps
|
* Weapon name is all capitalized on all maps
|
||||||
@ -36,6 +36,8 @@
|
|||||||
* Weapon name and ammo no longer fade out
|
* Weapon name and ammo no longer fade out
|
||||||
* Grenade icons no longer fade based on how many the player currently has
|
* Grenade icons no longer fade based on how many the player currently has
|
||||||
* Ammo counter no longer shows while scoped on all maps
|
* Ammo counter no longer shows while scoped on all maps
|
||||||
|
* Added proper game mode and map name to scoreboard
|
||||||
|
* Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife
|
||||||
* Increased waypoint offset from top of screen
|
* Increased waypoint offset from top of screen
|
||||||
* Changed player waypoint location to be center of player instead of top of player
|
* Changed player waypoint location to be center of player instead of top of player
|
||||||
* Increased distance between revive waypoint arrow and icon
|
* Increased distance between revive waypoint arrow and icon
|
||||||
|
@ -6,6 +6,7 @@ CoD.CompetitiveScoreboard.FloatingLosePointsColor = {
|
|||||||
g = 0,
|
g = 0,
|
||||||
b = 0,
|
b = 0,
|
||||||
}
|
}
|
||||||
|
CoD.CompetitiveScoreboard.IsDLC1Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC1Maps)
|
||||||
CoD.CompetitiveScoreboard.IsDLC2Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
|
CoD.CompetitiveScoreboard.IsDLC2Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
|
||||||
CoD.CompetitiveScoreboard.IsDLC3Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC3Maps)
|
CoD.CompetitiveScoreboard.IsDLC3Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC3Maps)
|
||||||
CoD.CompetitiveScoreboard.IsDLC4Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps)
|
CoD.CompetitiveScoreboard.IsDLC4Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps)
|
||||||
@ -72,7 +73,49 @@ CoD.CompetitiveScoreboard.HAVE_SHOVEL = 1
|
|||||||
CoD.CompetitiveScoreboard.HAVE_UG_SHOVEL = 2
|
CoD.CompetitiveScoreboard.HAVE_UG_SHOVEL = 2
|
||||||
CoD.CompetitiveScoreboard.NEED_HELMET = 0
|
CoD.CompetitiveScoreboard.NEED_HELMET = 0
|
||||||
CoD.CompetitiveScoreboard.HAVE_HELMET = 1
|
CoD.CompetitiveScoreboard.HAVE_HELMET = 1
|
||||||
if CoD.CompetitiveScoreboard.IsDLC2Map == true then
|
CoD.Zombie.CharacterNameDisplayMaps = {}
|
||||||
|
CoD.Zombie.CharacterNameDisplayMaps[1] = CoD.Zombie.MAP_ZM_TRANSIT
|
||||||
|
CoD.Zombie.CharacterNameDisplayMaps[2] = CoD.Zombie.MAP_ZM_HIGHRISE
|
||||||
|
CoD.Zombie.CharacterNameDisplayMaps[3] = CoD.Zombie.MAP_ZM_PRISON
|
||||||
|
CoD.Zombie.CharacterNameDisplayMaps[4] = CoD.Zombie.MAP_ZM_BURIED
|
||||||
|
CoD.Zombie.CharacterNameDisplayMaps[5] = CoD.Zombie.MAP_ZM_TOMB
|
||||||
|
if Dvar.ui_mapname:get() == CoD.Zombie.MAP_ZM_TRANSIT then
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames = {}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
||||||
|
name = "Misty",
|
||||||
|
modelName = "c_zom_player_farmgirl_fb",
|
||||||
|
}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
||||||
|
name = "Marlton",
|
||||||
|
modelName = "c_zom_player_engineer_fb",
|
||||||
|
}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
||||||
|
name = "Stuhlinger",
|
||||||
|
modelName = "c_zom_player_reporter_fb",
|
||||||
|
}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
||||||
|
name = "Russman",
|
||||||
|
modelName = "c_zom_player_oldman_fb",
|
||||||
|
}
|
||||||
|
elseif CoD.CompetitiveScoreboard.IsDLC1Map == true then
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames = {}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
||||||
|
name = "Misty",
|
||||||
|
modelName = "c_zom_player_farmgirl_dlc1_fb",
|
||||||
|
}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
||||||
|
name = "Marlton",
|
||||||
|
modelName = "c_zom_player_engineer_dlc1_fb",
|
||||||
|
}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
||||||
|
name = "Stuhlinger",
|
||||||
|
modelName = "c_zom_player_reporter_dlc1_fb",
|
||||||
|
}
|
||||||
|
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
||||||
|
name = "Russman",
|
||||||
|
modelName = "c_zom_player_oldman_dlc1_fb",
|
||||||
|
}
|
||||||
|
elseif CoD.CompetitiveScoreboard.IsDLC2Map == true then
|
||||||
CoD.CompetitiveScoreboard.CharacterNames = {}
|
CoD.CompetitiveScoreboard.CharacterNames = {}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
||||||
name = "Finn",
|
name = "Finn",
|
||||||
@ -159,9 +202,7 @@ LUI.createMenu.CompetitiveScoreboard = function(LocalClientIndex)
|
|||||||
PlayerScoreListWidget.characterName:setTopBottom(false, false, -CharacterNameTextSize / 2, CharacterNameTextSize / 2)
|
PlayerScoreListWidget.characterName:setTopBottom(false, false, -CharacterNameTextSize / 2, CharacterNameTextSize / 2)
|
||||||
PlayerScoreListWidget.characterName:setFont(CoD.fonts[CharacterNameFont])
|
PlayerScoreListWidget.characterName:setFont(CoD.fonts[CharacterNameFont])
|
||||||
PlayerScoreListWidget.characterName:setAlignment(LUI.Alignment.Right)
|
PlayerScoreListWidget.characterName:setAlignment(LUI.Alignment.Right)
|
||||||
if CoD.CompetitiveScoreboard.IsDLC3Map == true then
|
|
||||||
PlayerScoreListWidget.characterName:registerEventHandler("character_name_fade_out", CoD.CompetitiveScoreboard.FadeoutCharacterName)
|
PlayerScoreListWidget.characterName:registerEventHandler("character_name_fade_out", CoD.CompetitiveScoreboard.FadeoutCharacterName)
|
||||||
end
|
|
||||||
PlayerScoreListWidget:addElement(PlayerScoreListWidget.characterName)
|
PlayerScoreListWidget:addElement(PlayerScoreListWidget.characterName)
|
||||||
end
|
end
|
||||||
PlayerScoreListWidget.scoreText = LUI.UIText.new()
|
PlayerScoreListWidget.scoreText = LUI.UIText.new()
|
||||||
@ -405,7 +446,7 @@ CoD.CompetitiveScoreboard.Update = function(CompetitiveScoreboardWidget, ClientI
|
|||||||
if ClientIndex == ClientInstance.selfindex then
|
if ClientIndex == ClientInstance.selfindex then
|
||||||
CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf(CompetitiveScoreboardWidget.Scores[ClientScoreIndex], ClientScoreIndex, 0)
|
CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf(CompetitiveScoreboardWidget.Scores[ClientScoreIndex], ClientScoreIndex, 0)
|
||||||
CompetitiveScoreboardWidget.Scores[ClientScoreIndex].scoreBg:setAlpha(1)
|
CompetitiveScoreboardWidget.Scores[ClientScoreIndex].scoreBg:setAlpha(1)
|
||||||
if CoD.Zombie.IsCharacterNameDisplayMap() == true then
|
if CoD.Zombie.IsCharacterNameDisplayMap() == true and CoD.CompetitiveScoreboard.ShouldUpdateCharacterName(CompetitiveScoreboardWidget, ClientInstance) then
|
||||||
CoD.CompetitiveScoreboard.UpdateCharacterName(CompetitiveScoreboardWidget, ClientInstance.modelName, CompetitiveScoreboardWidget.Scores[ClientScoreIndex], ClientIndex)
|
CoD.CompetitiveScoreboard.UpdateCharacterName(CompetitiveScoreboardWidget, ClientInstance.modelName, CompetitiveScoreboardWidget.Scores[ClientScoreIndex], ClientIndex)
|
||||||
CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor(CompetitiveScoreboardWidget.Scores[ClientScoreIndex].characterName, ClientIndex, 0)
|
CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor(CompetitiveScoreboardWidget.Scores[ClientScoreIndex].characterName, ClientIndex, 0)
|
||||||
end
|
end
|
||||||
@ -598,6 +639,18 @@ CoD.CompetitiveScoreboard.HasBit = function(ClientFieldValue, NavCardBit)
|
|||||||
return NavCardBit <= ClientFieldValue % (NavCardBit + NavCardBit)
|
return NavCardBit <= ClientFieldValue % (NavCardBit + NavCardBit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
CoD.CompetitiveScoreboard.ShouldUpdateCharacterName = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
|
local LocalClientIndex = ClientInstance.controller
|
||||||
|
|
||||||
|
if UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_HUD_VISIBLE) == 0 then
|
||||||
|
return false
|
||||||
|
elseif UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 1 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.UpdateCharacterName = function(CompetitiveScoreboardWidget, ClientInstanceModelName, PlayerScoreListWidget, ClientIndex)
|
CoD.CompetitiveScoreboard.UpdateCharacterName = function(CompetitiveScoreboardWidget, ClientInstanceModelName, PlayerScoreListWidget, ClientIndex)
|
||||||
if not ClientInstanceModelName and PlayerScoreListWidget.characterName then
|
if not ClientInstanceModelName and PlayerScoreListWidget.characterName then
|
||||||
PlayerScoreListWidget.characterName:setText("")
|
PlayerScoreListWidget.characterName:setText("")
|
||||||
@ -615,12 +668,10 @@ CoD.CompetitiveScoreboard.UpdateCharacterName = function(CompetitiveScoreboardWi
|
|||||||
if CharacterNameIndex > 0 and PlayerScoreListWidget.characterName then
|
if CharacterNameIndex > 0 and PlayerScoreListWidget.characterName then
|
||||||
PlayerScoreListWidget.characterName:setText(CoD.CompetitiveScoreboard.CharacterNames[CharacterNameIndex].name)
|
PlayerScoreListWidget.characterName:setText(CoD.CompetitiveScoreboard.CharacterNames[CharacterNameIndex].name)
|
||||||
PlayerScoreListWidget.playerModelName = ClientInstanceModelName
|
PlayerScoreListWidget.playerModelName = ClientInstanceModelName
|
||||||
if CoD.CompetitiveScoreboard.IsDLC3Map == true then
|
|
||||||
PlayerScoreListWidget.characterName.fadeOutTimer = LUI.UITimer.new(CoD.CompetitiveScoreboard.CHARACTER_NAME_ONSCREEN_DURATION, "character_name_fade_out", true, CompetitiveScoreboardWidget)
|
PlayerScoreListWidget.characterName.fadeOutTimer = LUI.UITimer.new(CoD.CompetitiveScoreboard.CHARACTER_NAME_ONSCREEN_DURATION, "character_name_fade_out", true, CompetitiveScoreboardWidget)
|
||||||
PlayerScoreListWidget.characterName:addElement(PlayerScoreListWidget.characterName.fadeOutTimer)
|
PlayerScoreListWidget.characterName:addElement(PlayerScoreListWidget.characterName.fadeOutTimer)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.FadeoutCharacterName = function(CharacterNameWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.FadeoutCharacterName = function(CharacterNameWidget, ClientInstance)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user