Hello there. I'm looking through your code, and I've spotted this weird thing:
in g_local.h, level_locals_t defines:
int numteamVotingClients[2];// set by CalculateRanks
It is used in g_main, CalculateRanks:
...
for ( i = 0; i < TEAM_NUM_TEAMS; i++ ) {
level.numteamVotingClients[i] = 0;
}
...
team_t is defined like this:
typedef enum {
TEAM_FREE,
TEAM_RED,
TEAM_BLUE,
TEAM_SPECTATOR,
TEAM_NUM_TEAMS
} team_t;
TEAM_NUM_TEAMS is 4, so the loop in CalculatRanks overflows.
Cheers,
Mads Lind
Hello there. I'm looking through your code, and I've spotted this weird thing: in g_local.h, level_locals_t defines: int numteamVotingClients[2];// set by CalculateRanks It is used in g_main, CalculateRanks: ... for ( i = 0; i < TEAM_NUM_TEAMS; i++ ) { level.numteamVotingClients[i] = 0; } ... team_t is defined like this: typedef enum { TEAM_FREE, TEAM_RED, TEAM_BLUE, TEAM_SPECTATOR, TEAM_NUM_TEAMS } team_t; TEAM_NUM_TEAMS is 4, so the loop in CalculatRanks overflows. Cheers, Mads Lind