Yeah, it will be better keep fonline: tla mk2 instead of fallout online. I know fallout2online is better for search but be careful
We also moved to a new address, http://fallout2online.com/en & http://fallout2online.com/forum, to get separated from the main http://fonline.ru website, which will get more SDK-oriented.
Added a possibility for multiple critters to be on the same hex
Any hints?
PM'ed.
This is some secret?
1) Critter flag is removed from the hex where critter was standing2) We change the coordinates of the critter and send a signal to the client3) We save the old critter in the client4) We place the new critter into the new position in the client (and place him in the hex)Something like this, although I could forget something.
void critter_action(bool localCall, CritterCl& cr, int action, int actionExt, ItemCl@ item){...switch(action){case ACTION_MOVE:{if( actionExt != 0 ) // Few critters on one hex support.{Message( " actionExt " + actionExt ); uint16 x=(actionExt)&0xFFFF;uint16 y=(actionExt>>16)&0xFFFF;// Critter is removed from the hex// cr.HexX, cr.HexYif( valid( cr.LastHexCritter ) && cr.LastHexCritter.HexX == cr.HexX && cr.LastHexCritter.HexY == cr.HexY ){SetCritterHex( cr.LastHexCritter, cr.HexX, cr.HexY );}else SetCritterHex( null, cr.HexX, cr.HexY );SetCritterHex( null, x, y );//SetCritterHex( cr, x, y );//SetCritterHex( null, x, y );}}break; case ACTION_REFRESH:if( actionExt != 0 ){uint16 x=(actionExt)&0xFFFF;uint16 y=(actionExt>>16)&0xFFFF;Message( " refresh cr.HexX " + cr.HexX + " cr.HexY " + cr.HexY ); Message( " x " + x + " y " + y );@cr.LastHexCritter = SetCritterHex( cr, x, y );//CritterCl@[] crs;//for( uint i = 0, iEnd = GetCrittersHex( x, y, 0, int findType, CritterCl@[]@+ critters); i < iEnd; i++ )} break;...}...}
Let them think up the rest themselves