View Single Post
  #16  
Old 09-16-2014, 04:57 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 358
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
here is a quick example of why it would be great if bitwise operations were fixed on serverside -

PHP Code:

function onPlayerLogin(temp.pl
  
temp.pl.attr[20] = 0;
  
public function 
setFlag(temp.pltemp.f)
  
temp.pl.attr[20] |= temp.f;

function 
unsetFlag(temp.pltemp.f)
  
temp.pl.attr[20] &= ~temp.f;

public function 
setHidden(temp.pl)
  
this.setFlag(temp.pl16);
  
public function 
unsetHidden(temp.pl)
  
this.unsetFlag(temp.pl16);
  
public function 
setGodMode(temp.pl)
  
this.setFlag(temp.pl256);
  
public function 
unsetGodMode(temp.pl)
  
this.unsetFlag(temp.pl256);

//#CLIENTSIDE
function onCreated()
  
this.onTimeout();

function 
onTimeout() {
  for (
temp.pl players) {
    
temp.temp.pl.attr[20];
    if (
temp.pl.attrSave != temp.a) {
      
temp.pl.attrSave temp.a;
      
temp.pl.isPaused temp.1;
      
temp.pl.isNotBlocking temp.2;
      
temp.pl.canNotAttack temp.4;
      
temp.pl.isRecoiling temp.8;
      
temp.pl.isHidden temp.16;
      
temp.pl.isRotating temp.32;
      
temp.pl.isShrinking temp.64;
      
temp.pl.isDead temp.128;
      
temp.pl.hasGodMode temp.256;
    }
  }
  
this.setTimer(0.05);

attack system -

PHP Code:
//#CLIENTSIDE
function canHarm(temp.pl)
  return
    !
temp.pl.canNotAttack &&
    !
temp.pl.isHidden
  

wall checking system -

PHP Code:
//#CLIENTSIDE
function isPlayerBlocking(temp.pl)
  return
    !
temp.pl.isPaused &&
    !
temp.pl.isNotBlocking &&
    !
temp.pl.canNotAttack &&
    !
temp.pl.isHidden &&
    !
temp.pl.isDead
  

__________________
This signature has been deleted by Darlene159.

Last edited by Jakov_the_Jakovasaur; 09-16-2014 at 06:54 PM..
Reply With Quote