Merge branch 'fix-delay' into 'master'

Fix attack delay

See merge request veloren/veloren!194

Former-commit-id: 2846e7c2ffe0c35427a9bb7fa0c387fd6374e0c9
This commit is contained in:
Joshua Barretto 2019-05-28 20:23:24 +00:00
commit f8e18eef01

View File

@ -483,7 +483,14 @@ impl Server {
},
ClientMsg::Attack => match client.client_state {
ClientState::Character => {
state.write_component(entity, comp::Attacking::start());
if state
.ecs()
.read_storage::<comp::Attacking>()
.get(entity)
.is_none()
{
state.write_component(entity, comp::Attacking::start());
}
}
_ => client.error_state(RequestStateError::Impossible),
},