devolution

Author Topic: Torturer Bug Fix  (Read 1937 times)

0 Members and 1 Guest are viewing this topic.

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Torturer Bug Fix
« on: November 07, 2011, 06:10:54 AM »
I used this and people aren't reporting crashes, so I thought I'd post it. Then again, if there are problems with doing this, I'd like to hear about it.

cBrothel.cpp
line ~2129 in mine, not sure about the official svn

Code: [Select]
        if(g_Girls.GetStat(current, STAT_TIREDNESS) > 80)
        {
            if (matron)
            {
                if(current->m_NightJob == JOB_TORTURER)
                {
                    TortureDone(false);
                    current->m_PrevDayJob = current->m_DayJob;
                    current->m_PrevNightJob = current->m_NightJob;
                    current->m_DayJob = current->m_NightJob = JOB_RESTING;
                    MatronWarningMsg += "Your matron takes " + girlName + " off duty to rest due to her tiredness.\n";
                }
                if(current->m_PrevNightJob == 255 && current->m_PrevDayJob == 255)
                {
                    current->m_PrevDayJob = current->m_DayJob;
                    current->m_PrevNightJob = current->m_NightJob;
                    current->m_DayJob = current->m_NightJob = JOB_RESTING;
                    MatronWarningMsg += "Your matron takes " + girlName + " off duty to rest due to her tiredness.\n";
                    //current->m_Events.AddMessage(msg, IMGTYPE_DEATH, EVENT_WARNING);
                }
                else
                {
                    if((g_Dice%100)+1 < 70)
                    {
                        MatronMsg += "Your matron helps " + girlName + " to relax.\n";
                        //current->m_Events.AddMessage(msg, IMGTYPE_PROFILE, DayNight);
                        g_Girls.UpdateStat(current, STAT_TIREDNESS, -5);
                    }
                }
            }
            else
                //MatronWarningMsg += "CAUTION! This girl desperately need rest. Give her some free time\n";
                current->m_Events.AddMessage("CAUTION! This girl desparatly need rest. Give her some free time", IMGTYPE_DEATH, EVENT_WARNING);
        }
I separately did those duplicate lines because I was getting issues otherwise. I don't remember exactly with what.

Emphasis on
 TortureDone(false);
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.