Source/ThunderBeast/QuakeToon/game/g_save.c
void WriteEdict (FILE *f, edict_t *ent)
{
	field_t		*field;
	edict_t		temp;

	// all of the ints, floats, and vectors stay as they are
	temp = *ent;

	// change the pointers to lengths or indexes
	for (field=fields ; field->name ; field++)
	{
		WriteField1 (f, field, (byte *)&temp);
	}

	// write the block
	fwrite (&temp, sizeof(temp), 1, f);

	// now write any allocated data following the edict
	for (field=fields ; field->name ; field++)
	{
		WriteField2 (f, field, (byte *)ent);
	}

}
/*
==============
WriteEdict

All pointer variables (except function pointers) must be handled specially.
==============
*/
WriteEdict
All pointer variables (except function pointers) must be handled specially.
WriteEdict All pointer variables ( except function pointers ) must be handled specially .
void WriteEdict (FILE *f, edict_t *ent)
{
	field_t		*field;
	edict_t		temp;
	temp = *ent;
	for (field=fields ; field->name ; field++)
	{
		WriteField1 (f, field, (byte *)&temp);
	}
	fwrite (&temp, sizeof(temp), 1, f);
	for (field=fields ; field->name ; field++)
	{
		WriteField2 (f, field, (byte *)ent);
	}
}
void WriteEdict ( FILE * f , edict_t * ent ) { field_t * field ; edict_t temp ; temp = * ent ; for ( field = fields ; field -> name ; field ++ ) { WriteField1 ( f , field , ( byte * ) & temp ) ; } fwrite ( & temp , sizeof ( temp ) , 1 , f ) ; for ( field = fields ; field -> name ; field ++ ) { WriteField2 ( f , field , ( byte * ) ent ) ; } }
WriteEdict
All pointer variables (except function pointers) must be handled specially.
WriteEdict All pointer variables ( except function pointers ) must be handled specially .
// all of the ints, floats, and vectors stay as they are // change the pointers to lengths or indexes // write the block // now write any allocated data following the edict