mirror of
https://github.com/Febbweiss/sis.git
synced 2026-03-05 06:35:37 +00:00
Bugfix: right maximum loader : considering the weapon stock
This commit is contained in:
@@ -246,7 +246,7 @@ Weapon.prototype = {
|
|||||||
|
|
||||||
if( !this.reload_timer) {
|
if( !this.reload_timer) {
|
||||||
this.reload_timer = setInterval( function() {
|
this.reload_timer = setInterval( function() {
|
||||||
_this.load = Math.min(_this.load + 1, _this.max_load);
|
_this.load = Math.min(_this.load + 1, Math.min(_this.max_load, _this.stock));
|
||||||
if( _this.load == _this.max_load ) {
|
if( _this.load == _this.max_load ) {
|
||||||
clearInterval(_this.reload_timer);
|
clearInterval(_this.reload_timer);
|
||||||
_this.reload_timer = false;
|
_this.reload_timer = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user