diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-14 22:50:05 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:51 +0000 |
commit | 20b6c68b9511adddf32030f5785eb2667a7f0e8c (patch) | |
tree | 5ebc667f7ae54a5457c1a6e9bf088ec059050a5d | |
parent | 064c6646b3d1f270422dba2caf09b6bc75a1b27d (diff) |
* Report source file in some error messages
-rw-r--r-- | src/game/g_combat.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c index fb9d5942..2dca0736 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -411,7 +411,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int G_ParseDmgScript =============== */ -int G_ParseDmgScript( damageRegion_t *regions, char *buf ) +static int G_ParseDmgScript( damageRegion_t *regions, char *buf ) { char *token; float angleSpan, heightSpan; @@ -425,13 +425,13 @@ int G_ParseDmgScript( damageRegion_t *regions, char *buf ) if( strcmp( token, "{" ) ) { - G_Printf( "Missing { in damage region file\n" ); + COM_ParseError( "Missing {" ); break; } if( count >= MAX_DAMAGE_REGIONS ) { - G_Printf( "Max damage regions exceeded in damage region file\n" ); + COM_ParseError( "Max damage regions exceeded" ); break; } @@ -450,7 +450,7 @@ int G_ParseDmgScript( damageRegion_t *regions, char *buf ) if( !token[ 0 ] ) { - G_Printf( "Unexpected end of damage region file\n" ); + COM_ParseError( "Unexpected end of file" ); break; } @@ -506,7 +506,7 @@ int G_ParseDmgScript( damageRegion_t *regions, char *buf ) } else { - G_Printf("WARNING: unknown token \"%s\" in damage script\n", token); + COM_ParseWarning("Unknown token \"%s\"", token); } } @@ -818,6 +818,8 @@ void G_InitDamageLocations( void ) continue; } + COM_BeginParseSession( filename ); + trap_FS_Read( buffer, len, fileHandle ); buffer[len] = 0; trap_FS_FCloseFile( fileHandle ); @@ -844,6 +846,8 @@ void G_InitDamageLocations( void ) continue; } + COM_BeginParseSession( filename ); + trap_FS_Read( buffer, len, fileHandle ); buffer[len] = 0; trap_FS_FCloseFile( fileHandle ); |