Fix sleeping for product combinator

This commit is contained in:
Pascal Serrarens 2026-04-23 12:17:05 +02:00
parent e4ba7f8497
commit cc9a845b64

View File

@ -222,11 +222,10 @@ namespace NanoBrain {
public void SleepCheck() { public void SleepCheck() {
if (this.isSleeping) { if (this.isSleeping) {
#if UNITY_MATHEMATICS #if UNITY_MATHEMATICS
this.bias = new float3(0, 0, 0); this._outputValue = new float3(0, 0, 0);
#else #else
this.bias = new Vector3(0,0,0); this._outputValue = new Vector3(0,0,0);
#endif #endif
this._outputValue = this.bias;
} }
} }
@ -526,12 +525,13 @@ namespace NanoBrain {
public virtual void RemoveReceiver(Nucleus receiverToRemove) { public virtual void RemoveReceiver(Nucleus receiverToRemove) {
this._receivers.RemoveAll(receiver => receiver == receiverToRemove); this._receivers.RemoveAll(receiver => receiver == receiverToRemove);
receiverToRemove.synapses.RemoveAll(synapse => synapse.neuron == this); receiverToRemove.synapses.RemoveAll(synapse => synapse.neuron == this);
} }
#endregion Receivers #endregion Receivers
public override void ProcessStimulus(Vector3 inputValue) {; public override void ProcessStimulus(Vector3 inputValue) {
;
this.lastUpdate = Time.time; this.lastUpdate = Time.time;
this.bias = inputValue; this.bias = inputValue;
this.parent.UpdateFromNucleus(this); this.parent.UpdateFromNucleus(this);