no need to have conditions since ID are the same

This commit is contained in:
Baoulettes 2022-04-30 20:54:42 +02:00 committed by GitHub
parent ce148e7659
commit e4e86e8a10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -423,14 +423,8 @@ void GameState_Update(GameState* gameState) {
gSaveContext.dayTime = prevTime;
}
//I added this check here to allow Player to switch languages on runtime
if (CVar_GetS32("gLanguages", 0) == 0) {
gSaveContext.language = LANGUAGE_ENG;
} else if (CVar_GetS32("gLanguages", 0) == 1) {
gSaveContext.language = LANGUAGE_GER;
} else if (CVar_GetS32("gLanguages", 0) == 2) {
gSaveContext.language = LANGUAGE_FRA;
}
//since our CVar is same value and properly default to 0 there is not problems doing this in single line.
gSaveContext.language = CVar_GetS32("gLanguages", 0);
gameState->frames++;
}