Add invalidation for property source. Fix cache lock for scores.
This commit is contained in:
@@ -150,10 +150,12 @@ namespace Cryville.Crtr {
|
||||
var key = scoreop.Key;
|
||||
_etor.ContextSelfValue = scoreSrcs[key.name.Key];
|
||||
_etor.Evaluate(scoreOps[key.name.Key], scoreop.Value);
|
||||
scoreSrcs[key.name.Key].Invalidate();
|
||||
foreach (var s in _rs.scores) {
|
||||
if (s.Value.value != null) {
|
||||
_etor.ContextSelfValue = scoreSrcs[s.Key.Key];
|
||||
_etor.Evaluate(scoreOps[s.Key.Key], s.Value.value);
|
||||
scoreSrcs[s.Key.Key].Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ namespace Cryville.Crtr {
|
||||
public abstract class PropSrc {
|
||||
int _type;
|
||||
byte[] _buf = null;
|
||||
public void Invalidate() { _buf = null; }
|
||||
public void Get(out int type, out byte[] value) {
|
||||
if (_buf == null) InternalGet(out _type, out _buf);
|
||||
type = _type;
|
||||
|
Reference in New Issue
Block a user