Total Members Voted: 18
0 Members and 1 Guest are viewing this topic.
/* global */#define TPSIZE 200#include <windows.h> /* coord, abs() */COORD PlayerLastCoord [ 32 ] [ 30 ];unsigned short int iPlayerID;unsigned short int iLoopStep;/* in server loop */for ( iPlayerID = 0; iPlayerID < 32; iPlayerID ++ ) { for ( iLoopStep = 1; iLoopStep < sizeof ( PlayerLastCoord [ iPlayerID ] ) / sizeof ( COORD ); iLoopStep ++ ) PlayerLastCoord [ iPlayerID ] [ iLoopStep - 1 ] = PlayerLastCoord [ iPlayerID ] [ iLoopStep ]; PlayerLastCoord [ iPlayerID ] [ sizeof ( PlayerLastCoord [ iPlayerID ] ) / sizeof ( COORD ) - 1 ] = /*global player xy*/ PlayerCoords [ iPlayerID ]; if ( abs ( PlayerLastCoord [ iPlayerID ] [ 0 ] . X - PlayerLastCoord [ iPlayerID ] [ sizeof ( PlayerLastCoord [ iPlayerID ] ) / sizeof ( COORD ) - 1 ] . X ) > TPSIZE || abs ( PlayerLastCoord [ iPlayerID ] [ 0 ] . Y - PlayerLastCoord [ iPlayerID ] [ sizeof ( PlayerLastCoord [ iPlayerID ] ) / sizeof ( COORD ) - 1 ] . Y ) > TPSIZE ) /*vote player cheats!*/ }