mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 15:17:13 +02:00
Remove SLongInt and ULongInt helper types.
Fix a bunch of bugs and mistakes discovered along the way.
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
#include "Base/Color3.hpp"
|
||||
#include "Base/Vector2.hpp"
|
||||
#include "Entity/Player.hpp"
|
||||
#include "Library/Numeric/Long.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
@ -173,9 +172,9 @@ void SendPluginCommand(uint32_t identifier, StackStrF & payload)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const ULongInt & GetTime()
|
||||
SQInteger GetTime()
|
||||
{
|
||||
return GetULongInt(_Func->GetTime());
|
||||
return static_cast< SQInteger >(_Func->GetTime());
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@ -218,7 +217,7 @@ const SQChar * GetPluginAuthor()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
int32_t GetPluginID()
|
||||
uint32_t GetPluginID()
|
||||
{
|
||||
return _Info->pluginId;
|
||||
}
|
||||
@ -242,7 +241,7 @@ uint32_t GetServerFlags()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
int32_t GetMaxPlayers()
|
||||
uint32_t GetMaxPlayers()
|
||||
{
|
||||
return _Func->GetMaxPlayers();
|
||||
}
|
||||
@ -468,7 +467,7 @@ int32_t GetTimeRate()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void SetTimeRate(uint32_t rate)
|
||||
void SetTimeRate(int32_t rate)
|
||||
{
|
||||
_Func->SetTimeRate(rate);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ void SendPluginCommand(uint32_t identifier, StackStrF & payload);
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Retrieve the server time.
|
||||
*/
|
||||
const ULongInt & GetTime();
|
||||
SQInteger GetTime();
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Send a log message to the server.
|
||||
@ -84,7 +84,7 @@ SQMOD_NODISCARD const SQChar * GetPluginAuthor();
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Retrieve the id of the host Squirrel plug-in.
|
||||
*/
|
||||
SQMOD_NODISCARD int32_t GetPluginID();
|
||||
SQMOD_NODISCARD uint32_t GetPluginID();
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Retrieve the port onto which the server was binded.
|
||||
@ -99,7 +99,7 @@ SQMOD_NODISCARD uint32_t GetServerFlags();
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Retrieve the maximum number of clients allowed on the server.
|
||||
*/
|
||||
SQMOD_NODISCARD int32_t GetMaxPlayers();
|
||||
SQMOD_NODISCARD uint32_t GetMaxPlayers();
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Modify the maximum number of clients allowed on the server.
|
||||
@ -205,7 +205,7 @@ SQMOD_NODISCARD int32_t GetTimeRate();
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Modify the current time-rate.
|
||||
*/
|
||||
void SetTimeRate(uint32_t rate);
|
||||
void SetTimeRate(int32_t rate);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Retrieve the game hour.
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "Base/Color3.hpp"
|
||||
#include "Base/Vector2.hpp"
|
||||
#include "Entity/Player.hpp"
|
||||
#include "Library/Numeric/Long.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Misc/Functions.hpp"
|
||||
|
Reference in New Issue
Block a user