There are two bugs:
Sent squad from safe house A to safe house B.
Choosed to both cause trouble and use it as a safe house.
Kidnapped someone while causing trouble.
The guy was placed in safe house A while the squad was in safe house B.
Another one:
Had a guy in the bank as a sleeper agent.
Went there and opened the vault.
He had to become an active member to avoid police.
Under the activity menu he appeared as snooping around instead of laying low.
Edit:
--- src/sitemode/mapspecials.cpp (revision 635)
+++ src/sitemode/mapspecials.cpp (working copy)
@@ -2333,6 +2333,7 @@
pool[p]->location = pool[p]->base = activesquad->squad[0]->base;
pool[p]->flag &= ~CREATUREFLAG_SLEEPER;
+ pool[p]->activity.type = ACTIVITY_NONE;
pool[p]->crimes_suspected[LAWFLAG_BANKROBBERY]++;
break;
edit2:
Now I'm trying to fix the hostages bug.
To reproduce get save.dat from
here, open the game, press w, press b, kidnap somebody, exit the apts, press r and press 2
From daily.c:
if(c=='s'||c=='b')basesquad(squad[sq],squad[sq]->activity.arg);
if(c=='t'||c=='b')
{
activesquad=squad[sq];
newsstoryst *ns=new newsstoryst;
ns->type=NEWSSTORY_SQUAD_SITE;
ns->positive=1;
ns->loc=squad[sq]->activity.arg;
newsstory.push_back(ns);
mode_site(squad[sq]->activity.arg);
}
if(squad[sq]->squad[0]!=NULL)
{
locatesquad(squad[sq],squad[sq]->squad[0]->base);
}
First the squad base is changed; then you move around the site where you can kidnap the conservative; when exiting, the conservative location is changed to match the squad location (sitemode.cpp); and, finally, the squad location is changed to match the squad base.
I'm not sure why locatesquad() isn't called before the ifs, and i'm not changing it to avoid creating new bugs. Maybe someone who knows the code better can help here.
So, I did it the same way it's done in other parts of the game:
// Out sleepers
if(location[cursite]->renting==RENTING_CCS)
{
for(int p=0;p<pool.size();p++)
{
if(pool[p]->flag & CREATUREFLAG_SLEEPER &&
pool[p]->location == cursite)
{
pool[p]->flag &= ~CREATUREFLAG_SLEEPER;
erase();
move(8,1);
addstr("Sleeper ", gamelog);
addstr(pool[p]->name, gamelog);
addstr(" has been outed by your bold attack!", gamelog);
gamelog.newline();
move(10,1);
addstr("The Liberal is now at your command as a normal squad member.", gamelog);
gamelog.newline();
pool[p]->base=activesquad->squad[0]->base;
pool[p]->location=pool[p]->base;
refresh();
getch();
}
}
}
Here is the patch, it doesn't seem to break anything.
--- src/combat/haulkidnap.cpp (revision 635)
+++ src/combat/haulkidnap.cpp (working copy)
@@ -658,7 +658,7 @@
*newcr=cr;
newcr->namecreature();
- newcr->location=activesquad->squad[0]->location;
+ newcr->location=activesquad->squad[0]->base;
newcr->base=activesquad->squad[0]->base;
newcr->flag|=CREATUREFLAG_MISSING;