mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix bug in Health::kill that caused Destroy event to never be emitted by preemptively setting is_dead
to true
This commit is contained in:
parent
3b87bf1e4a
commit
ca66a9f79b
@ -195,10 +195,7 @@ impl Health {
|
||||
|
||||
pub fn should_die(&self) -> bool { self.current == 0 }
|
||||
|
||||
pub fn kill(&mut self) {
|
||||
self.current = 0;
|
||||
self.is_dead = true;
|
||||
}
|
||||
pub fn kill(&mut self) { self.current = 0; }
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn revive(&mut self) {
|
||||
|
Loading…
Reference in New Issue
Block a user