Skip to content

Commit

Permalink
logs to verify something rq
Browse files Browse the repository at this point in the history
  • Loading branch information
onlypuppy7 committed Dec 12, 2024
1 parent 41a8bd5 commit e6af341
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions server-client/src/client-static/src/shellshock.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
11 changes: 9 additions & 2 deletions src/shell/guns.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
};
Expand Down
3 changes: 3 additions & 0 deletions src/shell/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e6af341

Please sign in to comment.