Working on the player respawn correctly

This commit is contained in:
Vladislav Khorev committed 2026-05-18 21:10:55 +03:00
1 parent 27b4b19df4
commit 2659951d8e
20 files changed
+6972 -86

No files matched your search

+3 -4
View File
@@ -7,7 +7,6 @@
#include "GameConstants.h"
#include "Environment.h"
namespace ZL {
const float ATTACK_COOLDOWN_TIME = 1.6f;
@@ -431,9 +430,9 @@ void Character::update(int64_t deltaMs) {
{
currentState = AnimationState::DEATH_IDLE;
if (onDeathAnimComplete) {
auto cb = std::move(onDeathAnimComplete);
onDeathAnimComplete = nullptr;
cb();
//auto cb = std::move(onDeathAnimComplete);
//onDeathAnimComplete = nullptr;
onDeathAnimComplete();
//TODO: need to add some delay here
currentState = AnimationState::STAND;
resetAnim = true;