1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-21 17:47:13 +02:00

Migrated the host module to C++ exceptions as well.

Also enabled the latest C++ revision in the project.
Replaced the Random library with the one provided by C++11.
Implemented a simple AES256 encryption class.
Various other fixes and improvements.
This commit is contained in:
Sandu Liviu Catalin
2016-03-10 05:57:13 +02:00
parent 3162221e7f
commit 70e5f0ba21
124 changed files with 14873 additions and 14062 deletions
cbp
config/mingw32
external
include
modules
shared
source

@ -739,10 +739,9 @@ Object & FindPlayer(Object & by)
Int32 id = _Func->GetPlayerIDFromName(&str[0]);
if (VALID_ENTITYEX(id, SQMOD_PLAYER_POOL))
_Core->GetPlayer(id).mObj;
}
break;
} break;
default:
SqThrow("Unsupported search identifier");
SqThrowF("Unsupported search identifier");
}
return NullObject();
}

@ -155,14 +155,18 @@ bool EnabledChatTagsByDefault(void)
// ------------------------------------------------------------------------------------------------
void CreateExplosion(Int32 world, Int32 type, const Vector3 & pos, CPlayer & source, Uint32 level)
{
if (source.Validate())
_Func->CreateExplosion(world, type, pos.x, pos.y, pos.z, source.GetID(), level);
// Validate the specified player
source.Validate();
// Perform the requested operation
_Func->CreateExplosion(world, type, pos.x, pos.y, pos.z, source.GetID(), level);
}
void CreateExplosionEx(Int32 world, Int32 type, Float32 x, Float32 y, Float32 z, CPlayer & source, Uint32 level)
{
if (source.Validate())
_Func->CreateExplosion(world, type, x, y, z, source.GetID(), level);
// Validate the specified player
source.Validate();
// Perform the requested operation
_Func->CreateExplosion(world, type, x, y, z, source.GetID(), level);
}
// ------------------------------------------------------------------------------------------------