Skip to content

Commit 66b0f61

Browse files
committed
Revert "[#33] Fix player's effects colors to match in UI (menu) and in-game"
This reverts commit 26f3de1.
1 parent 23b7577 commit 66b0f61

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed
1.74 KB
Binary file not shown.

code/cgame/cg_players.c

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,35 +1188,6 @@ static void CG_SetSkinAndModel( clientInfo_t *newInfo,
11881188
}
11891189

11901190

1191-
/*
1192-
====================
1193-
CG_ColorFromString
1194-
====================
1195-
*/
1196-
static void CG_ColorFromString( const char *v, vec3_t color ) {
1197-
int val;
1198-
1199-
VectorClear( color );
1200-
1201-
val = atoi( v );
1202-
1203-
if ( val < 1 || val > 7 ) {
1204-
VectorSet( color, 1, 1, 1 );
1205-
return;
1206-
}
1207-
1208-
if ( val & 1 ) {
1209-
color[2] = 1.0f;
1210-
}
1211-
if ( val & 2 ) {
1212-
color[1] = 1.0f;
1213-
}
1214-
if ( val & 4 ) {
1215-
color[0] = 1.0f;
1216-
}
1217-
}
1218-
1219-
12201191
/*
12211192
======================
12221193
CG_NewClientInfo
@@ -1253,15 +1224,15 @@ void CG_NewClientInfo( int clientNum ) {
12531224

12541225
// colors
12551226
v = Info_ValueForKey( configstring, "c1" );
1256-
CG_ColorFromString( v, newInfo.color1 );
1227+
CG_ColorFromChar( v[0], newInfo.color1 );
12571228

12581229
newInfo.c1RGBA[0] = 255 * newInfo.color1[0];
12591230
newInfo.c1RGBA[1] = 255 * newInfo.color1[1];
12601231
newInfo.c1RGBA[2] = 255 * newInfo.color1[2];
12611232
newInfo.c1RGBA[3] = 255;
12621233

12631234
v = Info_ValueForKey( configstring, "c2" );
1264-
CG_ColorFromString( v, newInfo.color2 );
1235+
CG_ColorFromChar( v[0], newInfo.color2 );
12651236

12661237
newInfo.c2RGBA[0] = 255 * newInfo.color2[0];
12671238
newInfo.c2RGBA[1] = 255 * newInfo.color2[1];

0 commit comments

Comments
 (0)