freddiaNHey Sevin,
I want to know how you implemented the custom capture point icons.
I personally use my customized version of mkHUD, which also has custom cap point icons, but when I join a casual/comp server or an sv_pure server (except for my server/some specific servers, that have it allowed in the whitelist), it changes back to the default one.
Thanks in advance!
freddiaN
Sure thing! The first thing you need to know is that custom textures can bypass sv_pure by being placed in the vgui/replay/thumbnails folder. This isn't limited to just custom CP icons; it applies to any other texture you want to use in the HUD.
After I created the icons and named them appropriately, I converted them to VTFs and put them in the folder above. Following that, I extracted the corresponding VMTs and placed them in their proper directory (sprites/obj_icons in this instance), and changed the $basetexture parameter to reflect the icons' new location in vgui/replay/thumbnails.
http://puu.sh/r3wQZ/a2777c6359.png
This is where most custom textures can stop and be expected to work. But the CP icons are special for some reason. Maybe because they're dynamic and can be called in and out during a typical CP round? Who knows, but Wiet and I figured the icons needed to be preloaded since they only showed up if you joined a listen server prior to joining one with sv_pure.
I did the preloading by referencing them on the main menu. You will need to append some code somewhere in mainmenuoverride.res to set this up. Here's what mine looked like for icon_obj_blu:
"cpicondummy1"
{
"ControlName" "EditablePanel"
"fieldname" "cpicondummy1"
"xpos" "9999"
"ypos" "9999"
"zpos" "11"
"wide" "0"
"tall" "0"
"visible" "0"
"SubButton"
{
"ControlName" "CExImageButton"
"fieldName" "SubButton"
"xpos" "0"
"ypos" "0"
"wide" "0"
"tall" "0"
"autoResize" "0"
"pinCorner" "3"
"visible" "0"
"enabled" "0"
"tabPosition" "0"
"textinsetx" "0"
"use_proportional_insets" "1"
"font" "VersionFont"
"textAlignment" "west"
"dulltext" "0"
"brighttext" "0"
"default" "1"
"SubImage"
{
"ControlName" "ImagePanel"
"fieldName" "SubImage"
"xpos" "9999"
"ypos" "9999"
"zpos" "1"
"wide" "12"
"tall" "12"
"visible" "1"
"enabled" "1"
"image" "../sprites/obj_icons/icon_obj_blu"
"scaleImage" "1"
}
}
}
All I did was create an element with a sub-image that I could use to reference (thereby preloading) the icons. Then I made damn sure to keep it hidden by setting the x/ypos way off-screen, hiding everything etc.
Forgive me for my late response; I'm used to being the only one who posts here nowadays, so I don't check back too often.