forked from teamnwah/openmw-tes3coop
Fix type mismatch
This commit is contained in:
parent
0d9a4f2b6f
commit
af7b232789
1 changed files with 3 additions and 3 deletions
|
@ -289,13 +289,13 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
||||||
Player *killer = Players::getPlayer(player->getLastAttackerId());
|
Player *killer = Players::getPlayer(player->getLastAttackerId());
|
||||||
|
|
||||||
short reason = 0; // unknown;
|
short reason = 0; // unknown;
|
||||||
int secondsSinceLastAttacker = std::chrono::duration_cast<std::chrono::duration<double>>(
|
double secondsSinceLastAttacker = chrono::duration_cast<chrono::duration<double>>(
|
||||||
std::chrono::steady_clock::now() - player->getLastAttackerTime()).count();
|
chrono::steady_clock::now() - player->getLastAttackerTime()).count();
|
||||||
|
|
||||||
if (!killer)
|
if (!killer)
|
||||||
killer = player;
|
killer = player;
|
||||||
|
|
||||||
if (secondsSinceLastAttacker < 3)
|
if (secondsSinceLastAttacker < 3.0f)
|
||||||
reason = 1; // killed
|
reason = 1; // killed
|
||||||
else
|
else
|
||||||
reason = 2; //suicide
|
reason = 2; //suicide
|
||||||
|
|
Loading…
Reference in a new issue