commit e5b8e4eeb86edab9de5914bef2b8276b597c0021 Author: /dev/humancontroller Date: Fri May 13 23:15:42 2011 +0200 add an AMP compat hack for target_force_win diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index 6499a66..5caedf1 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -321,6 +321,8 @@ Finds the spawn function for the entity and calls it, returning qfalse if not found =============== */ +extern void target_human_win_use( gentity_t *self, gentity_t *other, gentity_t *activator ); // AMP FIXME: remove this compat hax +extern void target_alien_win_use( gentity_t *self, gentity_t *other, gentity_t *activator ); // AMP FIXME: remove this compat hax qboolean G_CallSpawn( gentity_t *ent ) { spawn_t *s; @@ -359,6 +361,14 @@ qboolean G_CallSpawn( gentity_t *ent ) s->spawn( ent ); return qtrue; } + else if( !strcmp( ent->classname, "target_force_win" ) ) // AMP FIXME: remove this compat hax + { + int i; + G_SpawnInt( "team", "0", &i ); + ent->classname = i ? "target_human_win" : "target_alien_win"; + ent->use = i ? target_human_win_use : target_alien_win_use; + return qtrue; + } G_Printf( "%s doesn't have a spawn function\n", ent->classname ); return qfalse;