Quote:
Originally Posted by Hezzy002
hey
i gave you the solution to stop these people from moaning
so do it
or at the very least
give me a reason why you wont
unless ur scared
|
So I just threw some things together on a default server and simplified them for the sake of conducting a test:
PHP Code:
//#CLIENTSIDE
function onPlayerEnters(){
this.initClone();
this.setTimer(0.05);
}
function initClone(){
this.clone = this.showani(200, player.x, player.y, player.dir, player.ani.name);
this.clone.actor.red = 0;
this.clone.actor.blue = 0;
this.clone.layer = 3;
}
function onPlayerChats(){
if(player.chat == "init"){
this.initClone();
}
}
function updateClone(temp.x, temp.y){
this.clone.x += temp.x;
this.clone.y += temp.y;
}
function attemptUpdate(temp.m){
if(temp.m != NULL){
this.updateClone(temp.m[0], temp.m[1]);
return true;
}
return false;
}
function updateAni(temp.g){
if(this.clone.ani.name != temp.g){
this.clone.ani = temp.g;
}
}
function onTimeout(){
this.runSystems();
this.framecount ++;
this.setTimer(0.05);
}
function runSystems(){
if(player.hearts == 0){
this.updateAni("dead");
return;
}
temp.m = ThorRecoil.doRecoilMove(this.clone);
if(this.attemptUpdate(temp.m)){
return;
}
if(this.framecount - this.swordtime <= 5){
return;
}
temp.m = ThorMovement.doMoving(this.clone);
if(this.attemptUpdate(temp.m)){
this.updateAni("walk");
}
else{
this.updateAni("idle");
}
temp.pl = ThorHD.checkSwords(this.clone);
if(temp.pl != NULL){
temp.m = ThorRecoil.doRecoil(this.clone, temp.pl);
this.attemptUpdate(temp.m);
this.updateAni("hurt");
return;
}
if(keydown(5)){
this.swordtime = this.framecount;
this.updateAni("sword");
//The real system does have a 2nd layer of damage checks if you're ending blink time with the slash
}
}
Having attempted a spar the hit mechanism itself was spot on as I had expected, hits were consistent between my true player and clone display where their coordinates were matched.
However coordinates were
very slightly threw off each hit simply by the difference in our custom recoil having pixel-perfect movement values, compared to default recoils arbitrary angles. This was also expected but makes it impossible to do a complete test.
There is also the slight difference that should you walk into the edge of your opponents blocking area, the corner cutting is not the same, but again this is an intentional difference which looks smoother.