vengeio

let tt = null
let ii = null
let nn = null

Enemy.prototype.damage = function (t, i, e) {
   var n = !1
   if (
       (e && e.y > 0.9 && (n = !0),
       (this.damageAngle = Utils.lookAt(0, 0, e.x, e.z)),
       this.characterEntity.fire('Frensel:Damage', i),
       (this.tempAngle.x += 3 * Math.random() - 3 * Math.random()),
       (this.tempAngle.y += 2 * Math.random() - 2 * Math.random()),
       this.entity.script.label.onDamage(i),
       !this.isActivated)
   ) {
       var s = Math.round(2 * Math.random()) + 1,
           a = this.skin + '-Grunt-' + s,
           h = !0
       ;('TDM' != pc.currentMode && 'PAYLOAD' != pc.currentMode) || (pc.currentTeam == this.team && ((h = !1), this.app.fire('Overlay:FriendlyFire', !0))),
           h &&
               (this.app.fire('Hit:Point', this.entity, Math.floor(20 * Math.random()) + 5),
               this.entity.sound.play(a),
               n && this.app.fire('Hit:Headshot', this.entity, Math.floor(20 * Math.random()) + 5)),
           (this.lastDamage = Date.now()),
           'TDM' == pc.currentMode || pc.currentMode
   }

   tt = t
   ii = i
   nn = n

   console.log(t, i, n, this.playerId)
   this.app.fire('Network:Damage', t, i, n, this.playerId)
}


Movement.prototype.setShooting = function (t) {
   this.currentWeapon.ammo = 999999999999999999

 if (!this.isMouseLocked) return !1
 if (
     ('Melee' == this.currentWeapon.type && this.setMeleeShoot(),
     'Throwable' == this.currentWeapon.type && this.setThrowShoot(),
     'Launcher' == this.currentWeapon.type && this.setLauncherShoot(t),
     this.player.checkShooting(),
     !this.currentWeapon.isShootable)
 )
     return !1
 if (
     (this.leftMouse || this.isShootingLocked || this.isFireStopped || (this.stopFiring(), 0 === this.currentWeapon.ammo && this.reload()),
     this.leftMouse &&
         !this.isWeaponHidden &&
         !this.isShootingLocked &&
         !this.playerAbilities.isThrowing &&
         this.isReloading < this.timestamp &&
         this.playerAbilities.isHitting < this.timestamp &&
         (this.currentWeapon.ammo > 0 ? (this.isShooting = this.currentWeapon.shootTime + this.timestamp) : this.reload()),
     this.isShooting > this.timestamp && !this.isShootingLocked)
 ) {
     for (let xu = 1; xu < 50; xu++) {
         console.log(xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
         this.app.fire('Network:Damage', tt, ii, nn, xu)
     }

     this.currentWeapon.recoil, this.currentWeapon.cameraShake, Math.random(), Math.random(), this.currentWeapon.spread
     var i = Math.cos(110 * this.spreadCount)
     this.currentWeapon.spread
     this.cancelInspect(!0),
         this.isFocusing && 'Rifle' == this.currentWeapon.type && (-0.05, 0.5, -0.2, 0.5, 0.05, this.currentWeapon.focusSpread, this.currentWeapon.focusSpread * i),
         ('Sniper' != this.currentWeapon.type && 'Shotgun' != this.currentWeapon.type) ||
             ((this.spreadNumber = this.currentWeapon.spread), this.isFocusing && (this.spreadNumber = this.currentWeapon.focusSpread), -5, 5.2),
         this.currentWeapon.shoot(),
         this.currentWeapon.isAutomatic || ((this.isMouseReleased = !1), (this.leftMouse = !1))
     var e = this.currentWeapon.bulletPoint.getPosition().clone(),
         s = this.currentWeapon.bulletPoint.getEulerAngles().clone()
     ;('Sniper' == this.currentWeapon.type && this.isFocusing) || (this.app.fire('EffectManager:Bullet', e, s), this.entity.script.weaponManager.triggerShooting())
     var o = this.currentWeapon.muzzlePoint.getPosition().clone(),
         n = this.raycastShootFrom,
         a = Math.random() * this.spreadNumber - Math.random() * this.spreadNumber,
         h = Math.random() * this.spreadNumber - Math.random() * this.spreadNumber,
         r = Math.random() * this.spreadNumber - Math.random() * this.spreadNumber,
         p = this.raycastTo.clone().add(new pc.Vec3(a, h, r)),
         c = this.currentWeapon.damage,
         m = this.currentWeapon.distanceMultiplier
     if ('Shotgun' == this.currentWeapon.type) {
         this.app.fire('EffectManager:Fire', n, p, o, this.player.playerId, c, 'Shotgun', m)
         for (var u = 1, l = 0; l < 10; l++)
             l > 5 && (u = 0.5),
                 (a = Math.cos((l / 3) * Math.PI) * this.spreadNumber * u),
                 (h = Math.sin((l / 3) * Math.PI) * this.spreadNumber * u),
                 (r = Math.cos((l / 3) * Math.PI) * this.spreadNumber * u),
                 (p = this.raycastTo.clone().add(new pc.Vec3(a, h, r))),
                 this.app.fire('EffectManager:Fire', n, p, o, this.player.playerId, c, 'Shotgun', m)
     } else this.app.fire('EffectManager:Fire', n, p, o, this.player.playerId, c)
     this.setShakeAnimation(t), (this.isShootingLocked = !0), (this.isFireStopped = !1)
 }
 this.isShooting < this.timestamp && this.isShootingLocked && (this.isShootingLocked = !1), this.updateShakeAnimation(t)
}