Skip to content

Commit 7c8589a

Browse files
committed
custom heads: universal loading code (?)
by egor0928931
1 parent 25ad9f6 commit 7c8589a

File tree

108 files changed

+262
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+262
-787
lines changed

Accolades.as

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "pathway.as"
12
///////////////////////////////////////////////////////////////////////////////
23
//
34
// Accolades system
@@ -38,7 +39,7 @@ shared class Accolades
3839
Accolades(ConfigFile@ cfg, string _username)
3940
{
4041
username = _username;
41-
customHeadTexture = "../Mods/ctf_gruhsha/Characters/CustomHeads/" + username + ".png";
42+
customHeadTexture = getPath() + "Custom/CustomHeads/" + username + ".png";
4243
array<string> slices;
4344
if(cfg.readIntoArray_string(slices, username))
4445
{
@@ -126,8 +127,12 @@ shared class Accolades
126127
customHeadExists = doesCustomHeadExists();
127128
}
128129
}
130+
if(CFileMatcher(customHeadTexture).hasMatch())
131+
{
132+
customHeadExists = CFileImage(customHeadTexture).getWidth() == 64;
133+
}
129134
}
130-
135+
131136
bool doesCustomHeadExists()
132137
{
133138
return CFileMatcher(customHeadTexture).getFirst() == customHeadTexture;

Characters/Archer/Archer.cfg

100755100644
File mode changed.

Characters/Archer/ArcherAnim.as

100755100644
File mode changed.

Characters/Builder/Builder.cfg

100755100644
File mode changed.

Characters/Builder/BuilderAnim.as

100755100644
File mode changed.
-418 Bytes
Binary file not shown.
-534 Bytes
Binary file not shown.

Characters/Knight/Knight.cfg

100755100644
File mode changed.

Characters/Knight/KnightAnim.as

100755100644
File mode changed.

0 commit comments

Comments
 (0)