diff options
Diffstat (limited to 'src/game/g_spawn.c')
-rw-r--r-- | src/game/g_spawn.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index 78946712..bc42da6d 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -96,15 +96,10 @@ typedef enum { F_INT, F_FLOAT, - F_LSTRING, // string on disk, pointer in memory, TAG_LEVEL - F_GSTRING, // string on disk, pointer in memory, TAG_GAME + F_STRING, F_VECTOR, F_VECTOR4, - F_ANGLEHACK, - F_ENTITY, // index on disk, pointer in memory - F_ITEM, // index on disk, pointer in memory - F_CLIENT, // index on disk, pointer in memory - F_IGNORE + F_ANGLEHACK } fieldtype_t; typedef struct @@ -112,7 +107,6 @@ typedef struct char *name; size_t ofs; fieldtype_t type; - int flags; } field_t; field_t fields[ ] = @@ -123,25 +117,24 @@ field_t fields[ ] = {"angles", FOFS(s.angles), F_VECTOR}, {"animation", FOFS(animation), F_VECTOR4}, {"bounce", FOFS(physicsBounce), F_FLOAT}, - {"classname", FOFS(classname), F_LSTRING}, + {"classname", FOFS(classname), F_STRING}, {"count", FOFS(count), F_INT}, {"dmg", FOFS(damage), F_INT}, {"health", FOFS(health), F_INT}, - {"light", 0, F_IGNORE}, - {"message", FOFS(message), F_LSTRING}, - {"model", FOFS(model), F_LSTRING}, - {"model2", FOFS(model2), F_LSTRING}, + {"message", FOFS(message), F_STRING}, + {"model", FOFS(model), F_STRING}, + {"model2", FOFS(model2), F_STRING}, {"origin", FOFS(s.origin), F_VECTOR}, {"radius", FOFS(pos2), F_VECTOR}, {"random", FOFS(random), F_FLOAT}, {"rotatorAngle", FOFS(rotatorAngle), F_FLOAT}, {"spawnflags", FOFS(spawnflags), F_INT}, {"speed", FOFS(speed), F_FLOAT}, - {"target", FOFS(target), F_LSTRING}, - {"targetname", FOFS(targetname), F_LSTRING}, - {"targetShaderName", FOFS(targetShaderName), F_LSTRING}, - {"targetShaderNewName", FOFS(targetShaderNewName), F_LSTRING}, - {"team", FOFS(team), F_LSTRING}, + {"target", FOFS(target), F_STRING}, + {"targetname", FOFS(targetname), F_STRING}, + {"targetShaderName", FOFS(targetShaderName), F_STRING}, + {"targetShaderNewName", FOFS(targetShaderNewName), F_STRING}, + {"team", FOFS(team), F_STRING}, {"wait", FOFS(wait), F_FLOAT} }; @@ -400,7 +393,7 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) switch( f->type ) { - case F_LSTRING: + case F_STRING: *(char **)( b + f->ofs ) = G_NewString( value ); break; @@ -435,10 +428,6 @@ void G_ParseField( const char *key, const char *value, gentity_t *ent ) ( (float *)( b + f->ofs ) )[ 1 ] = v; ( (float *)( b + f->ofs ) )[ 2 ] = 0; break; - - default: - case F_IGNORE: - break; } } |