diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_main.c | 18 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 96362760..d48800fa 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1423,6 +1423,18 @@ static clientInfo_t * CG_InfoFromScoreIndex( int index, int team, int *scoreInde return &cgs.clientinfo[ cg.scores[ index ].client ]; } +static qboolean CG_ClientIsReady( int clientNum ) +{ + int val = clientNum / 4; + const char *s = CG_ConfigString( CS_CLIENTS_READY ); + while( *s && val-- ) + s++; + if( !*s ) + return qfalse; + sscanf( s, "%1x", &val ); + return ( ( val & ( clientNum % 4 ) ) != 0 ); +} + static const char *CG_FeederItemText( float feederID, int index, int column, qhandle_t *handle ) { int scoreIndex = 0; @@ -1441,8 +1453,7 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha info = CG_InfoFromScoreIndex( index, team, &scoreIndex ); sp = &cg.scores[ scoreIndex ]; - if( ( atoi( CG_ConfigString( CS_CLIENTS_READY ) ) & ( 1 << sp->client ) ) && - cg.intermissionStarted ) + if( cg.intermissionStarted && CG_ClientIsReady( sp->client ) ) showIcons = qfalse; else if( cg.snap->ps.pm_type == PM_SPECTATOR || cg.snap->ps.pm_flags & PMF_FOLLOW || team == cg.snap->ps.stats[ STAT_TEAM ] || cg.intermissionStarted ) @@ -1484,8 +1495,7 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha break; case 2: - if( ( atoi( CG_ConfigString( CS_CLIENTS_READY ) ) & ( 1 << sp->client ) ) && - cg.intermissionStarted ) + if( cg.intermissionStarted && CG_ClientIsReady( sp->client ) ) return "Ready"; break; diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 414d3a89..55a0a2ff 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -2087,6 +2087,8 @@ void CG_Bleed( vec3_t origin, vec3_t normal, int entityNum ) bleedPS = cgs.media.alienBuildableBleedPS; else if( team == TEAM_HUMANS ) bleedPS = cgs.media.humanBuildableBleedPS; + else + return; } else return; |