Skip to content
Snippets Groups Projects
Unverified Commit e857fcf0 authored by Kat Marchán's avatar Kat Marchán
Browse files

no need to re-instantiate a score

parent 54937950
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ pub fn score_thirst_system( ...@@ -31,7 +31,7 @@ pub fn score_thirst_system(
) { ) {
for (Parent(actor), mut score) in query.iter_mut() { for (Parent(actor), mut score) in query.iter_mut() {
if let Ok(thirst) = thirsts.get(*actor) { if let Ok(thirst) = thirsts.get(*actor) {
*score = Score(thirst.thirst); score.0 = thirst.thirst;
} }
} }
} }
......
...@@ -107,7 +107,7 @@ pub fn thirsty_scorer_system( ...@@ -107,7 +107,7 @@ pub fn thirsty_scorer_system(
// calculation here, possibly to clamp the value to a range, add a // calculation here, possibly to clamp the value to a range, add a
// curve, etc. In our case, we'll just assume thirst goes from // curve, etc. In our case, we'll just assume thirst goes from
// 0.0..100.0, to keep things simple. // 0.0..100.0, to keep things simple.
*score = Score(thirst.thirst); score.0 = thirst.thirst;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment