mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
improved punkbuster
This commit is contained in:
parent
e7052754c3
commit
a4120f6ff5
4 changed files with 19 additions and 5 deletions
|
|
@ -53,11 +53,20 @@ function(Parent, Nc, Parser, Settings) {
|
|||
}
|
||||
|
||||
if(difference.x < Settings.PUNKBUSTER_DIFFERENCE_METERS
|
||||
|| difference.y < Settings.PUNKBUSTER_DIFFERENCE_METERS) {
|
||||
&& difference.y < Settings.PUNKBUSTER_DIFFERENCE_METERS) {
|
||||
this.player.doll.updatePositionState(update);
|
||||
} else {
|
||||
// HARD UPDATE FOR SELF
|
||||
console.log(this.player.user.options.nickname + ' is cheating.')
|
||||
|
||||
var body = this.player.doll.body;
|
||||
|
||||
var options = {
|
||||
p: body.GetPosition(),
|
||||
lv: body.GetLinearVelocity()
|
||||
};
|
||||
|
||||
Nc.trigger(Nc.ns.channel.to.client.user.gameCommand.send + this.player.id, 'positionStateReset', options);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue