View Single Post
  #2  
Old 07-22-2012, 07:13 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Hezzy002 View Post
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(200player.xplayer.yplayer.dirplayer.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.xtemp.y){
  
this.clone.+= temp.x;
  
this.clone.+= temp.y;
}

function 
attemptUpdate(temp.m){
  if(
temp.!= 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.ThorRecoil.doRecoilMove(this.clone);

  if(
this.attemptUpdate(temp.m)){
    return;
  }
  
  if(
this.framecount this.swordtime <= 5){
    return;
  }

  
temp.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.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.
Reply With Quote