Just found a crazy bug. Sometimes the buffer that holds the entity string for the map isn't null terminated, meaning it sometimes has leftovers from other maps in there, causing strange things to happen. I was trying to put map in rotation, but it kept complaining about finding something like -696 when it expected {. I'm looking at the map file, it doesn't even have a -696. Scratching my head. I'm trying to reproduce it locally, and the error won't happen for me. Trying all kinds of different stuff. Finally modified the code to print the entity string out to a file and see this at the end:
{
"model" "*8"
"classname" "base"
"gamemode" "70"
"teamnumber" "1"
}"-2936 -696 248"
"type" "medium"
}
I check, and that's definitely not in the map file. Part of some other map's entity data was getting tacked onto the end there. Once I realized that, I found I could load 2 particular maps in order (in this case, rome.bsp and kots1_beta3.bsp), and it would have the error. I think this has also been the cause of some weird things like spawns outside of the level/in walls, etc.
Stupid Quake2 bugs. I'm amazed this has been in there for so long and not caused some really serious problems.