Cleanup unused FS tick value

ryzomclassic-develop
kaetemi 4 years ago
parent 92bfb0aafb
commit d07e219439
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -43,7 +43,7 @@
<leaf name="INIT_BANK" /> <leaf name="INIT_BANK" />
<leaf name="RESET_BANK" /> <leaf name="RESET_BANK" />
</branch> </branch>
<leaf name="POSITION" sendto="GPMS" format="u32 s32 s32 s32 f" usecycle="yes" description="the client moves to ($i32,$i32,$i32) with heading $f" /> <leaf name="POSITION" sendto="GPMS" format="u32 s32 s32 s32 f" description="the client moves at $u32 to ($i32,$i32,$i32) with heading $f" />
<branch name="HARVEST"> <branch name="HARVEST">
<leaf name="DEPOSIT" sendto="EGS" format="u16" description="the client shearch a deposit for harvest/digging (param = skill used)" /> <leaf name="DEPOSIT" sendto="EGS" format="u16" description="the client shearch a deposit for harvest/digging (param = skill used)" />
<leaf name="CORPSE" /> <leaf name="CORPSE" />

@ -50,8 +50,7 @@ void cbClientPosition( CMessage& msgin, const string &serviceName, NLNET::TServi
H_AUTO(cbClientPosition); H_AUTO(cbClientPosition);
CEntityId id; CEntityId id;
NLMISC::TGameCycle fsTick; msgin.serial(id);
msgin.serial(id, fsTick);
TDataSetRow entityIndex = TheDataset.getDataSetRow( id ); TDataSetRow entityIndex = TheDataset.getDataSetRow( id );
if ( !entityIndex.isValid() ) if ( !entityIndex.isValid() )
@ -62,16 +61,16 @@ void cbClientPosition( CMessage& msgin, const string &serviceName, NLNET::TServi
} }
// entity pos (x, y, z, theta) // entity pos (x, y, z, theta)
NLMISC::TGameCycle clientTick; NLMISC::TGameCycle tick;
sint32 x, y, z; sint32 x, y, z;
float heading; float heading;
msgin.serial(clientTick, x, y, z, heading); msgin.serial(tick, x, y, z, heading);
if (IsRingShard) if (IsRingShard)
{ {
// make sure the move that the player is trying to make is legal // make sure the move that the player is trying to make is legal
// if the move wasn't legal then the values of 'x' and 'y' will be changed to make them legal // if the move wasn't legal then the values of 'x' and 'y' will be changed to make them legal
bool moveWasLegal= pCGPMS->MoveChecker->checkMove(entityIndex, x, y, clientTick); bool moveWasLegal= pCGPMS->MoveChecker->checkMove(entityIndex, x, y, tick);
// if the move wasn't legal then dispatch a message to the player // if the move wasn't legal then dispatch a message to the player
if (!moveWasLegal) if (!moveWasLegal)
@ -103,7 +102,7 @@ void cbClientPosition( CMessage& msgin, const string &serviceName, NLNET::TServi
CMirrorPropValue1DS<sint32>( TheDataset, entityIndex, DSPropertyPOSY )= y; CMirrorPropValue1DS<sint32>( TheDataset, entityIndex, DSPropertyPOSY )= y;
CMirrorPropValue1DS<sint32>( TheDataset, entityIndex, DSPropertyPOSZ )= (z&~7) + (local ? 1 : 0) + (interior ? 2 : 0) + (water ? 4 : 0); CMirrorPropValue1DS<sint32>( TheDataset, entityIndex, DSPropertyPOSZ )= (z&~7) + (local ? 1 : 0) + (interior ? 2 : 0) + (water ? 4 : 0);
CMirrorPropValue1DS<float>( TheDataset, entityIndex, DSPropertyORIENTATION )= heading; CMirrorPropValue1DS<float>( TheDataset, entityIndex, DSPropertyORIENTATION )= heading;
CMirrorPropValue1DS<NLMISC::TGameCycle>( TheDataset, entityIndex, DSPropertyTICK_POS )= clientTick + GPMS_LCT_TICKS; CMirrorPropValue1DS<NLMISC::TGameCycle>( TheDataset, entityIndex, DSPropertyTICK_POS )= tick + GPMS_LCT_TICKS;
CMirrorPropValue1DS<TYPE_CELL> cell ( TheDataset, entityIndex, DSPropertyCELL ); CMirrorPropValue1DS<TYPE_CELL> cell ( TheDataset, entityIndex, DSPropertyCELL );
uint32 cx = (uint16) ( + x/CWorldPositionManager::getCellSize() ); uint32 cx = (uint16) ( + x/CWorldPositionManager::getCellSize() );
@ -144,7 +143,7 @@ void cbClientPosition( CMessage& msgin, const string &serviceName, NLNET::TServi
//CWorldPositionManager::setEntityPosition(id, x, y, z, heading, tick); //CWorldPositionManager::setEntityPosition(id, x, y, z, heading, tick);
if (player->getType() == CWorldEntity::Player && player->CheckMotion && player->PosInitialised) if (player->getType() == CWorldEntity::Player && player->CheckMotion && player->PosInitialised)
{ {
CWorldPositionManager::movePlayer(player, x, y, z, heading, clientTick); CWorldPositionManager::movePlayer(player, x, y, z, heading, tick);
} }
} }
} // cbClientPosition // } // cbClientPosition //

Loading…
Cancel
Save