Replace remaining int64_t by int64 for the sake of consistency

The codebase uses int64 since commit f4344dc420.
This commit is contained in:
Alexander Akulich 2021-02-06 17:42:34 +03:00
parent a1fb94c6b7
commit ef6282d2e0
6 changed files with 6 additions and 24 deletions

View file

@ -950,7 +950,7 @@ void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData)
{
int Team = pResult->GetInteger(0);
if(pPlayer->m_Last_Team + (int64_t)pSelf->Server()->TickSpeed() * g_Config.m_SvTeamChangeDelay > pSelf->Server()->Tick())
if(pPlayer->m_Last_Team + (int64)pSelf->Server()->TickSpeed() * g_Config.m_SvTeamChangeDelay > pSelf->Server()->Tick())
{
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "join",
"You can\'t change teams that fast!");

View file

@ -2335,10 +2335,10 @@ void CCharacter::Rescue()
{
if(m_SetSavePos && !m_Super)
{
if(m_LastRescue + (int64_t)g_Config.m_SvRescueDelay * Server()->TickSpeed() > Server()->Tick())
if(m_LastRescue + (int64)g_Config.m_SvRescueDelay * Server()->TickSpeed() > Server()->Tick())
{
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "You have to wait %d seconds until you can rescue yourself", (int)((m_LastRescue + (int64_t)g_Config.m_SvRescueDelay * Server()->TickSpeed() - Server()->Tick()) / Server()->TickSpeed()));
str_format(aBuf, sizeof(aBuf), "You have to wait %d seconds until you can rescue yourself", (int)((m_LastRescue + (int64)g_Config.m_SvRescueDelay * Server()->TickSpeed() - Server()->Tick()) / Server()->TickSpeed()));
GameServer()->SendChatTarget(GetPlayer()->GetCID(), aBuf);
return;
}

View file

@ -21,14 +21,6 @@
#include <memory>
#ifdef _MSC_VER
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64;
typedef unsigned __int64 uint64;
#else
#include <stdint.h>
#endif
/*
Tick
Game Context (CGameContext::tick)

View file

@ -6,16 +6,6 @@
#include <base/vmath.h>
#include <engine/map.h>
class CDoor;
#if !defined(_MSC_VER) || _MSC_VER >= 1600
#include <stdint.h>
#else
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64;
typedef unsigned __int64 uint64;
#endif
/*
Class: Game Controller
Controls the main game logic. Keeping track of team and player score,

View file

@ -805,7 +805,7 @@ void CPlayer::OverrideDefaultEmote(int Emote, int Tick)
bool CPlayer::CanOverrideDefaultEmote() const
{
return m_LastEyeEmote == 0 || m_LastEyeEmote + (int64_t)g_Config.m_SvEyeEmoteChangeDelay * Server()->TickSpeed() < Server()->Tick();
return m_LastEyeEmote == 0 || m_LastEyeEmote + (int64)g_Config.m_SvEyeEmoteChangeDelay * Server()->TickSpeed() < Server()->Tick();
}
void CPlayer::ProcessPause()
@ -842,7 +842,7 @@ int CPlayer::Pause(int State, bool Force)
case PAUSE_NONE:
if(m_pCharacter->IsPaused()) // First condition might be unnecessary
{
if(!Force && m_LastPause && m_LastPause + (int64_t)g_Config.m_SvSpecFrequency * Server()->TickSpeed() > Server()->Tick())
if(!Force && m_LastPause && m_LastPause + (int64)g_Config.m_SvSpecFrequency * Server()->TickSpeed() > Server()->Tick())
{
GameServer()->SendChatTarget(m_ClientID, "Can't /spec that quickly.");
return m_Paused; // Do not update state. Do not collect $200

View file

@ -128,7 +128,7 @@ bool CScore::RateLimitPlayer(int ClientID)
CPlayer *pPlayer = GameServer()->m_apPlayers[ClientID];
if(pPlayer == 0)
return true;
if(pPlayer->m_LastSQLQuery + (int64_t)g_Config.m_SvSqlQueriesDelay * Server()->TickSpeed() >= Server()->Tick())
if(pPlayer->m_LastSQLQuery + (int64)g_Config.m_SvSqlQueriesDelay * Server()->TickSpeed() >= Server()->Tick())
return true;
pPlayer->m_LastSQLQuery = Server()->Tick();
return false;