adjusted timestamp function to always return value in seconds

This commit is contained in:
kamilprzyb
2020-09-23 11:05:18 +02:00
parent 09f1f67778
commit 016c48645e
4 changed files with 6 additions and 5 deletions

View File

@@ -691,7 +691,7 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) {
void PlayerManager::enterPlayerVehicle(CNSocket* sock, CNPacketData* data) {
PlayerView& plr = PlayerManager::players[sock];
if (plr.plr->Equip[8].iID > 0 && plr.plr->Equip[8].iTimeLimit>(getTimestamp()/1000)) {
if (plr.plr->Equip[8].iID > 0 && plr.plr->Equip[8].iTimeLimit>getTimestamp()) {
INITSTRUCT(sP_FE2CL_PC_VEHICLE_ON_SUCC, response);
sock->sendPacket((void*)&response, P_FE2CL_PC_VEHICLE_ON_SUCC, sizeof(sP_FE2CL_PC_VEHICLE_ON_SUCC));
@@ -711,7 +711,7 @@ void PlayerManager::enterPlayerVehicle(CNSocket* sock, CNPacketData* data) {
sock->sendPacket((void*)&response, P_FE2CL_PC_VEHICLE_ON_FAIL, sizeof(sP_FE2CL_PC_VEHICLE_ON_FAIL));
//check if vehicle didn't expire
if (plr.plr->Equip[8].iTimeLimit < (getTimestamp() / 1000))
if (plr.plr->Equip[8].iTimeLimit < getTimestamp())
{
plr.plr->toRemoveVehicle.eIL = 0;
plr.plr->toRemoveVehicle.iSlotNum = 8;