Hi, I've being battling to find a way to replace entities in a map at map loading time. After numerous attempts I've run out of ideas. I've worked my way all the way back to G_SpawnEntitiesFromString() trying to figure it out, alas, no luck! Here's my latest (quick) attempt to load ammo_bfg entities as ammo_cells:
Hope this works (I have not tried it, to be honest).
I may have found a better solution. You could try to modify the function 'G_CallSpawn' in 'g_spawn.c'. There is a 'for' loop in which the function tries to find the item with the given classname. I have added the code I think is needed:
//_SP added if (strcmp(ent->classname, "ammo_bfg") == 0) strcpy(ent->classname, "ammo_plasma"); //_SP