From 8fb1d6132d1d79c3d1bd0ad18d26d96d010abab7 Mon Sep 17 00:00:00 2001 From: shmyga Date: Thu, 28 Mar 2019 20:50:27 +0300 Subject: [PATCH] [common] Player state life fix --- package.json | 2 +- src/common/haxe/ru/m/tankz/game/Player.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0f02ed6..0d7cc76 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tankz", - "version": "0.8.9", + "version": "0.8.10", "private": true, "devDependencies": { "dateformat": "^3.0.3", diff --git a/src/common/haxe/ru/m/tankz/game/Player.hx b/src/common/haxe/ru/m/tankz/game/Player.hx index e51bd1a..4566056 100644 --- a/src/common/haxe/ru/m/tankz/game/Player.hx +++ b/src/common/haxe/ru/m/tankz/game/Player.hx @@ -19,7 +19,7 @@ class Player { this.control = null; this.state = state == null ? new PlayerState(id) : state; this.state.reset(); - this.state.life = config.life; + this.state.life = Math.isNaN(config.life) ? 0 : config.life; } private function set_tankId(value:Int):Int {