The second one is when you select the next girl button in the new buildings, it sends you to girls in the first brothel instead of girls in the building you are in.
I found an answer to this one.
if (selected_girl->m_InClinic)
{
prev_girl = g_Clinic.GetGirl(0, cycle_girls[cycle_pos]);
}
else if (selected_girl->m_InMovieStudio)
{
prev_girl = g_Studios.GetGirl(0, cycle_girls[cycle_pos]);
}
else if (selected_girl->m_InArena)
{
prev_girl = g_Arena.GetGirl(0, cycle_girls[cycle_pos]);
}
else if (selected_girl->m_InCentre)
{
prev_girl = g_Centre.GetGirl(0, cycle_girls[cycle_pos]);
}
When g_xxx.GetGirl is called, it's calling the cBrothelManager::GetGirl(int brothelID, int num) function in cbrothel.cpp line 3990. It looks like you've tried to reference different classes, but since you haven't defined a GetGirl function within those classes, it's using the GetGirl function in cbrothel.cpp. For example, g_Arena.GetGirl refers to the cArenaManager::GetGirl function. But there is no cArenaManager::GetGirl function, so it should be failing to work. I don't know why it's finding the cBrothelManager::GetGirl function, but it's using that instead. You need to define a GetGirl function for each of these building managers, so it can use the correct function and find a girl in the correct building. Currently, since it's using the GetGirl function in cBrothel.cpp, it's looking in the brothels instead of the correct building, and since you're passing a 0 to the function for the brothel ID, it's looking specifically in the first brothel.
Edit: Thinking about the way this is coded, this could be the source of a lot of your crashes, too. What happens when cycle_girls[cycle_pos] gives a value higher than the current number of girls in brothel 0? This could happen if there are more girls in any of the new buildings than there are in the first brothel.
Edit again: I figured out what the problem really was and a solution to the problem, so edited this. My last post here was based on incomplete information.