mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Parse the fog info depending on the game version
This commit is contained in:
parent
cb95284d0c
commit
9603f8e38a
1 changed files with 9 additions and 7 deletions
|
@ -783,9 +783,7 @@ void Com_Printf( const char *msg, ... ) {
|
|||
|
||||
#endif
|
||||
|
||||
#if TARGET_GAME_PROTOCOL >= 15
|
||||
|
||||
void CG_ParseFogInfo(const char* str) {
|
||||
void CG_ParseFogInfo_ver_15(const char* str) {
|
||||
sscanf(
|
||||
str,
|
||||
"%d %f %f %f %f %f %f %f %d %f %f %f %f",
|
||||
|
@ -805,9 +803,7 @@ void CG_ParseFogInfo(const char* str) {
|
|||
);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void CG_ParseFogInfo(const char* str) {
|
||||
void CG_ParseFogInfo_ver_6(const char* str) {
|
||||
cg.farclipOverride = 0.0;
|
||||
cg.farplaneColorOverride[0] = -1.0;
|
||||
cg.farplaneColorOverride[1] = -1.0;
|
||||
|
@ -824,4 +820,10 @@ void CG_ParseFogInfo(const char* str) {
|
|||
);
|
||||
}
|
||||
|
||||
#endif
|
||||
void CG_ParseFogInfo(const char* str) {
|
||||
if (cgi.protocol >= PROTOCOL_MOHTA_MIN) {
|
||||
CG_ParseFogInfo_ver_15(str);
|
||||
} else {
|
||||
CG_ParseFogInfo_ver_6(str);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue