+ if (fromNull)
+ {
+ // Approximated score. Real one is slightly higher due to tempo
+ ss->staticEval = bestValue = -(ss-1)->staticEval;
+ ss->evalMargin = VALUE_ZERO;
+ }
+ else if (tte)
+ {
+ // Never assume anything on values stored in TT
+ if ( (ss->staticEval = bestValue = tte->static_value()) == VALUE_NONE
+ ||(ss->evalMargin = tte->static_value_margin()) == VALUE_NONE)
+ ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
+ }
+ else
+ ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);