This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
Revision | 055e308e6015cb7f4a8c6c9a4ef0a1cbda59bdc4 (tree) |
---|---|
Time | 2022-09-15 08:36:08 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
cl_identifytarget now always prints a player's skin with their current class, if unmorphed. If cl_skins is 0, then the skin is always printed as "base" instead.
@@ -90,7 +90,7 @@ | ||
90 | 90 | ! - The "spam" medal is now only awarded if the player frags another player with a projectile or puff that awards the medal, as it should be. [Kaminsky] |
91 | 91 | ! - Blacklisted the connect, disconnect, reconnect, and restart CCMDs from ConsoleCommand. [Kaminsky] |
92 | 92 | ! - gl_texture is now forced to be true when sv_forcevideodefaults is true. [Kaminsky] |
93 | -! - cl_identifytarget now prints "ally" if the target is a teammate of the player being spied on, instead of the local player. [Kaminsky] | |
93 | +! - cl_identifytarget now prints "ally" if the target is a teammate of the player being spied on, instead of the local player. Also, it now always prints a player's skin with their current class, if unmorphed. If cl_skins is 0, then the skin is always printed as "base" instead. [Kaminsky] | |
94 | 94 | |
95 | 95 | |
96 | 96 | 3.1 |
@@ -1869,18 +1869,46 @@ | ||
1869 | 1869 | // [AK] Print this player's class. |
1870 | 1870 | if ( cl_identifytarget >= IDENTIFY_TARGET_CLASS ) |
1871 | 1871 | { |
1872 | - const char *szClassString; | |
1872 | + FString classString; | |
1873 | 1873 | |
1874 | - // [Cata] Display in this priority: Morph Class > Class > Skin. | |
1874 | + // [AK] Display the name of the class the player is current playing as. | |
1875 | + // If they're supposed to be morphed, don't print the name of their skin. | |
1875 | 1876 | if ( pTargetPlayer->MorphedPlayerClass ) |
1876 | - szClassString = pTargetPlayer->MorphedPlayerClass->TypeName.GetChars(); | |
1877 | - else if ( PlayerClasses.Size() > 1 ) | |
1878 | - szClassString = GetPrintableDisplayName( pTargetPlayer->cls ); | |
1877 | + { | |
1878 | + classString = pTargetPlayer->MorphedPlayerClass->TypeName.GetChars( ); | |
1879 | + } | |
1879 | 1880 | else |
1880 | - szClassString = skins[pTargetPlayer->userinfo.GetSkin()].name; | |
1881 | + { | |
1882 | + FString skinString; | |
1883 | + | |
1884 | + if ( PlayerClasses.Size( ) > 1 ) | |
1885 | + classString = GetPrintableDisplayName( pTargetPlayer->cls ); | |
1886 | + | |
1887 | + if ( classString.IsNotEmpty( )) | |
1888 | + classString += " - "; | |
1889 | + | |
1890 | + // [AK] Get the name of the player's current skin, if skins are enabled. | |
1891 | + // Their skin should only be displayed if they're playing the class meant | |
1892 | + // for it. Otherwise, print "base" instead. | |
1893 | + if ( cl_skins ) | |
1894 | + { | |
1895 | + const int skin = pTargetPlayer->userinfo.GetSkin( ); | |
1896 | + | |
1897 | + for ( unsigned int i = 0; i < PlayerClasses.Size( ); i++ ) | |
1898 | + { | |
1899 | + if (( pTargetPlayer->cls == PlayerClasses[i].Type ) && ( PlayerClasses[i].CheckSkin( skin ))) | |
1900 | + { | |
1901 | + skinString += skins[skin].name; | |
1902 | + break; | |
1903 | + } | |
1904 | + } | |
1905 | + } | |
1906 | + | |
1907 | + classString += skinString.IsNotEmpty( ) ? skinString : "Base"; | |
1908 | + } | |
1881 | 1909 | |
1882 | 1910 | targetInfoMsg += '\n'; |
1883 | - targetInfoMsg.AppendFormat( TEXTCOLOR_GREEN "%s", szClassString ); | |
1911 | + targetInfoMsg.AppendFormat( TEXTCOLOR_GREEN "%s", classString.GetChars( )); | |
1884 | 1912 | } |
1885 | 1913 | } |
1886 | 1914 |
@@ -25,7 +25,7 @@ | ||
25 | 25 | 1.0, "Name" |
26 | 26 | 2.0, "Health and armor" |
27 | 27 | 3.0, "Weapon and ammo" |
28 | - 4.0, "Class or skin" | |
28 | + 4.0, "Class and skin" | |
29 | 29 | } |
30 | 30 | |
31 | 31 | OptionMenu ZA_MultiplayerOptions |