diff options
author | Tim Angus <tim@ngus.net> | 2002-10-19 01:21:32 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-10-19 01:21:32 +0000 |
commit | ac0c448419ac3bc61343c0813bad42bdf9787c23 (patch) | |
tree | f1679807d09dcb9923ff5221cab9426188e98424 /src/game/g_spawn.c | |
parent | 50b26bd0b69fbdd659c960e9b6227a60d31fb3ca (diff) |
* Removed supposed improvements to key parsing code :)
Diffstat (limited to 'src/game/g_spawn.c')
-rw-r--r-- | src/game/g_spawn.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index b8646ddf..55b90229 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -381,7 +381,6 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) float v; vec3_t vec; vec4_t vec4; - int i, count; for( f = fields; f->name; f++ ) { @@ -397,10 +396,7 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) break; case F_VECTOR: - count = sscanf( value, "%f %f %f", &vec[ 0 ], &vec[ 1 ], &vec[ 2 ] ); - - for( i = 2; i >= count; i-- ) - vec[ i ] = 0.0f; + sscanf( value, "%f %f %f", &vec[ 0 ], &vec[ 1 ], &vec[ 2 ] ); ( (float *)( b + f->ofs ) )[ 0 ] = vec[ 0 ]; ( (float *)( b + f->ofs ) )[ 1 ] = vec[ 1 ]; @@ -408,10 +404,7 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) break; case F_VECTOR4: - count = sscanf( value, "%f %f %f %f", &vec4[ 0 ], &vec4[ 1 ], &vec4[ 2 ], &vec4[ 3 ] ); - - for( i = 3; i >= count; i-- ) - vec[ i ] = 0.0f; + sscanf( value, "%f %f %f %f", &vec4[ 0 ], &vec4[ 1 ], &vec4[ 2 ], &vec4[ 3 ] ); ( (float *)( b + f->ofs ) )[ 0 ] = vec4[ 0 ]; ( (float *)( b + f->ofs ) )[ 1 ] = vec4[ 1 ]; |