diff --git a/server-client/src/client-static/src/shellshock.min.js b/server-client/src/client-static/src/shellshock.min.js index 5009bbf..ec91f93 100644 --- a/server-client/src/client-static/src/shellshock.min.js +++ b/server-client/src/client-static/src/shellshock.min.js @@ -6058,6 +6058,7 @@ function inputDown(code) { break; case "fire": document.pointerLockElement && me && me.pullTrigger(); + devlog("fire", {x: me.x, y: me.y, z: me.z}, {dx: me.dx, dy: me.dy, dz: me.dz}, {yaw: me.yaw, pitch: me.pitch}); case "jump": setControlKeys(control, true); // if (0 < me.lastTouchedGround && Date.now() > me.lastTouchedGround + 100 && me.jump()) { diff --git a/src/shell/guns.js b/src/shell/guns.js index 7ae6601..35c60e6 100644 --- a/src/shell/guns.js +++ b/src/shell/guns.js @@ -67,7 +67,10 @@ Gun.prototype.fire = function () { }; }; Gun.prototype.equip = function () { - this.player.weaponIdx = this.player.equipWeaponIdx, this.player.weapon = this.player.weapons[this.player.weaponIdx], this.player.weapon.actor.equip(), this.player.id == meId && updateAmmoUi() + this.player.weaponIdx = this.player.equipWeaponIdx; + this.player.weapon = this.player.weapons[this.player.weaponIdx]; + this.player.weapon.actor.equip(); + this.player.id == meId && updateAmmoUi() }; // [LS] Eggk47 CONSTRUCTOR @@ -130,7 +133,11 @@ DozenGauge.velocity = .45; DozenGauge.prototype.fireMunitions = function (pos, dir) { plugins.emit("fireDozenGauge", {this: this, pos, dir, DozenGauge}); for (var i = 0; i < 20; i++) { - this.v1.set(dir.x + Math.seededRandom(-.14, .14) * DozenGauge.range, dir.y + Math.seededRandom(-.09, .09) * DozenGauge.range, dir.z + Math.seededRandom(-.14, .14) * DozenGauge.range); + this.v1.set( + dir.x + Math.seededRandom(-.14, .14) * DozenGauge.range, + dir.y + Math.seededRandom(-.09, .09) * DozenGauge.range, + dir.z + Math.seededRandom(-.14, .14) * DozenGauge.range + ); plugins.emit("fireDozenGaugeBullet", {this: this, pos, v1: this.v1, DozenGauge}); if (!plugins.cancel) Bullet.fire(this.player, pos, this.v1, DozenGauge); }; diff --git a/src/shell/player.js b/src/shell/player.js index 7bd1ddc..b4afaa2 100644 --- a/src/shell/player.js +++ b/src/shell/player.js @@ -302,6 +302,8 @@ class Player { }; } else this.jumpHeld = false; + serverlog({x: this.x, y: this.y, z: this.z}, {dx: this.dx, dy: this.dy, dz: this.dz}, {yaw: this.yaw, pitch: this.pitch}); + if (this.climbing) { this.setJumping(false); var pdy = this.dy; @@ -424,6 +426,7 @@ class Player { } else if (oldMethod ? 0 < this.shotsQueued : this.controlKeys & CONTROL.fire) { this.lastActivity = Date.now(); this.fire(); + devlog("fire"); }; this.stateBuffer[this.stateIdx].x = this.x; this.stateBuffer[this.stateIdx].y = this.y;