mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-30 04:30:42 +02:00
[programming challenge] Disabled bonus caching. Minor changes.
This commit is contained in:
parent
f5bb1f3ba3
commit
d853bea6f4
@ -145,7 +145,7 @@ void BattleInfo::getAccessibilityMap(bool *accessibility, bool twoHex, bool atta
|
||||
|
||||
for(unsigned int g=0; g<stacks.size(); ++g)
|
||||
{
|
||||
if(!stacks[g]->alive() || (stackToOmmit && stacks[g]->ID==stackToOmmit->ID) || stacks[g]->position.isValid()) //we don't want to lock position of this stack (eg. if it's a turret)
|
||||
if(!stacks[g]->alive() || (stackToOmmit && stacks[g]->ID==stackToOmmit->ID) || !stacks[g]->position.isValid()) //we don't want to lock position of this stack (eg. if it's a turret)
|
||||
continue;
|
||||
|
||||
accessibility[stacks[g]->position] = false;
|
||||
|
@ -2505,6 +2505,8 @@ void CGameState::attachArmedObjects()
|
||||
|
||||
bool CGameState::isValidAction(const MakeAction &ma, bool verbose) const
|
||||
{
|
||||
boost::shared_lock<boost::shared_mutex> shl(*mx);
|
||||
|
||||
#define PROBLEM(txt) do{if(verbose) tlog1 << "Action invalid: " << txt << std::endl; return false;} while(0);
|
||||
|
||||
const CStack *stack = curB->getStack(ma.ba.stackNumber);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define BONUS_LOG_LINE(x) tlog5 << x << std::endl
|
||||
|
||||
int CBonusSystemNode::treeChanged = 1;
|
||||
const bool CBonusSystemNode::cachingEnabled = true;
|
||||
const bool CBonusSystemNode::cachingEnabled = false;
|
||||
|
||||
BonusList::BonusList(bool BelongsToTree /* =false */) : belongsToTree(BelongsToTree)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user