Bay 12 Games Forum
Other Projects => Curses => Topic started by: worthstream on May 12, 2011, 09:11:01 am
-
Sorry if i'm not checking it in the sourceforge SVN, but i'm at work and browsing the code on the web.
I found a small bug in the code, we're checking stealth against prisoners by type and not by name:
in /src/sitemode/stealth.cpp
on line 204 there is
204 if(encounter[e].type==CREATURE_PRISONER)continue;
but as stated in line 105 and later:
105 //if(encounter[e].type==CREATURE_PRISONER)continue;
106
107 // ...but Prisoners are now spawned with a variety of creature
108 // types, so we'll go by name instead
109 if(!strcmp(encounter[e].name,"Prisoner"))continue;
so it sould be
204 if(!strcmp(encounter[e].name,"Prisoner"))continue;
-
Another one that prevents compiling - I'm not sure why, but there's an odd assignment in activities.cpp that prevents compiling (at least for me)...
2470 //SECURITY?
2471 char alarmon=0;
2472 char sensealarm=0;
2473 if(LCSrandom(100)<v->sensealarmchance()) sensealarm=1;
2474 char touchalarm=0;
2475 if(LCSrandom(100)<v->touchalarmchance()) touchalarm=1;
2476 char windowdamage=08;
windowdamage=08... the zero causes it to be interpreted as an octal number, and the eight after it causes the compiler to have a bad day, if I've understood correctly.
It was committed recently (http://lcsgame.svn.sourceforge.net/viewvc/lcsgame/trunk/src/daily/activities.cpp?r1=499&r2=500) with no other actual code changes, so I think it's intended to do something. I've changed my working copy back to plain ol' 0 though.
-
It was committed recently (http://lcsgame.svn.sourceforge.net/viewvc/lcsgame/trunk/src/daily/activities.cpp?r1=499&r2=500) with no other actual code changes, so I think it's intended to do something. I've changed my working copy back to plain ol' 0 though.
I can't see what the purpose of this could have been. Windows should start out undamaged. Feel free to commit the change back to just 0.