any cond(bool condition, any a, any b)
If condition is true, returns a. Otherwise, returns b.
It simulates the ?: operator from C.
cond(true, A, B) -> A cond(false, A, B) -> B
Without cond():
int color = CR_RED;
if (PlayerTeam() == TEAM_BLUE)
color = CR_BLUE;
DrawSomething(color);
With cond():
DrawSomething(cond(PlayerTeam() == TEAM_BLUE, CR_BLUE, CR_RED));