mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Changed buff effects so they did not need to mutably change buffs every tick. Buff system now no longer mutably accesses buffs component.
This commit is contained in:
@ -223,6 +223,7 @@ impl StateExt for State {
|
||||
},
|
||||
Effect::Buff(buff) => {
|
||||
let time = self.ecs().read_resource::<Time>();
|
||||
let stats = self.ecs().read_storage::<comp::Stats>();
|
||||
self.ecs()
|
||||
.write_storage::<comp::Buffs>()
|
||||
.get_mut(entity)
|
||||
@ -234,6 +235,7 @@ impl StateExt for State {
|
||||
buff.cat_ids,
|
||||
comp::BuffSource::Item,
|
||||
*time,
|
||||
stats.get(entity),
|
||||
),
|
||||
*time,
|
||||
)
|
||||
|
Reference in New Issue
Block a user