View Single Post
  #1  
Old 04-13-2011, 06:27 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
servrside tilelayers issue

So, I'm adjusting tiles serverside and if the layer I choose is 0, it works fine, but if it's >0 it doesn't seem to do anything. Is they're something I'm doing wrong? This works fine clientside, except it doesn't update the tiles for all players.

params are
{ action, layer, arrayTiles, x, y, w, h}

PHP Code:
function onActionServerside()
{

  if ( 
params[ 0] == "PlaceTiles")
  {

    for ( 
temp.a = 0; temp.a < params[ 6]; temp.a ++;)
    {
    
      for ( 
temp.b = 0; temp.b < params[ 5]; temp.b ++;)
      {
      
        
findLevel( player.level).tilelayers[ params[ 1]].tiles[( params[ 3] + temp.b) % 64, ( params[ 4] + temp.a) % 64] = params[ 2][ temp.c]; 
        
temp.c ++;
    
      }
    }
    
    
findLevel( player.level).tilelayers[ params[ 1]].updateBoard2( params[ 3], params[ 4], params[ 5], params[ 6]);
 
  }
} 
e. Also, does anyone know why polygons wont draw in an external window?
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!

Last edited by MrOmega; 04-13-2011 at 08:53 PM..
Reply With Quote