Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0546426157 | ||
|
2837dd77a5 | ||
|
30d8882833 | ||
|
e2990c5e05 | ||
|
5fdb24c6c1 | ||
|
2c8071995d | ||
|
7ed4e88915 | ||
|
453001ae9c | ||
|
b71a98f174 | ||
|
6b3ca53a92 | ||
|
da2c643675 | ||
|
2e0beed7c9 | ||
|
182da464cd | ||
|
e42ff417b1 | ||
|
0c147446d5 | ||
|
86fbf20a85 | ||
|
cd1a296e4f | ||
|
3ddf9f8a0d | ||
|
82df6087af | ||
|
bef8562de5 | ||
|
1000d419fc | ||
|
2a9deb6a64 | ||
|
351e406f85 | ||
|
d6e518838f | ||
|
9e39f18230 | ||
|
3dd1e5a318 | ||
|
23e1c0b71e | ||
|
a1436cd205 | ||
|
0d320b7922 | ||
|
b2a0d0e4da | ||
|
273f058da9 | ||
|
c6f751bb67 | ||
|
00b7ac5a39 | ||
|
c0686dc4f9 | ||
|
7ab3a3cfd9 | ||
|
5293815bf6 |
@ -214,6 +214,16 @@ class SMConfig(object):
|
|||||||
if cxx.like('msvc') and len(self.archs) > 1:
|
if cxx.like('msvc') and len(self.archs) > 1:
|
||||||
raise Exception('Building multiple archs with MSVC is not currently supported')
|
raise Exception('Building multiple archs with MSVC is not currently supported')
|
||||||
|
|
||||||
|
if cxx.family == 'msvc':
|
||||||
|
if cxx.version < 1900:
|
||||||
|
raise Exception('Only MSVC 2015 and later are supported, c++14 support is required.')
|
||||||
|
if cxx.family == 'gcc':
|
||||||
|
if cxx.version < 'gcc-4.9':
|
||||||
|
raise Exception('Only GCC versions 4.9 or greater are supported, c++14 support is required.')
|
||||||
|
if cxx.family == 'clang':
|
||||||
|
if cxx.version < 'clang-3.4':
|
||||||
|
raise Exception('Only clang versions 3.4 or greater are supported, c++14 support is required.')
|
||||||
|
|
||||||
if cxx.like('gcc'):
|
if cxx.like('gcc'):
|
||||||
self.configure_gcc(cxx)
|
self.configure_gcc(cxx)
|
||||||
elif cxx.family == 'msvc':
|
elif cxx.family == 'msvc':
|
||||||
@ -379,6 +389,16 @@ class SMConfig(object):
|
|||||||
def configure_windows(self, cxx):
|
def configure_windows(self, cxx):
|
||||||
cxx.defines += ['WIN32', '_WINDOWS']
|
cxx.defines += ['WIN32', '_WINDOWS']
|
||||||
|
|
||||||
|
def add_libamtl(self):
|
||||||
|
# Add libamtl.
|
||||||
|
self.libamtl = {}
|
||||||
|
for arch in self.archs:
|
||||||
|
def get_configure_fn(arch):
|
||||||
|
return lambda builder, name: self.StaticLibrary(builder, name, arch)
|
||||||
|
extra_vars = {'Configure': get_configure_fn(arch)}
|
||||||
|
libamtl = builder.Build('public/amtl/amtl/AMBuilder', extra_vars)
|
||||||
|
self.libamtl[arch] = libamtl.binary
|
||||||
|
|
||||||
def AddVersioning(self, binary, arch):
|
def AddVersioning(self, binary, arch):
|
||||||
if builder.target.platform == 'windows':
|
if builder.target.platform == 'windows':
|
||||||
binary.sources += ['version.rc']
|
binary.sources += ['version.rc']
|
||||||
@ -498,8 +518,7 @@ class SMConfig(object):
|
|||||||
|
|
||||||
if compiler.like('msvc'):
|
if compiler.like('msvc'):
|
||||||
compiler.defines += ['COMPILER_MSVC', 'COMPILER_MSVC32']
|
compiler.defines += ['COMPILER_MSVC', 'COMPILER_MSVC32']
|
||||||
if compiler.version >= 1900:
|
compiler.linkflags += ['legacy_stdio_definitions.lib']
|
||||||
compiler.linkflags += ['legacy_stdio_definitions.lib']
|
|
||||||
else:
|
else:
|
||||||
compiler.defines += ['COMPILER_GCC']
|
compiler.defines += ['COMPILER_GCC']
|
||||||
|
|
||||||
@ -613,6 +632,7 @@ SM = SMConfig()
|
|||||||
SM.detectProductVersion()
|
SM.detectProductVersion()
|
||||||
SM.detectSDKs()
|
SM.detectSDKs()
|
||||||
SM.configure()
|
SM.configure()
|
||||||
|
SM.add_libamtl()
|
||||||
|
|
||||||
if SM.use_auto_versioning():
|
if SM.use_auto_versioning():
|
||||||
SM.generated_headers = builder.Build(
|
SM.generated_headers = builder.Build(
|
||||||
|
@ -84,9 +84,7 @@ for sdk_name in SM.sdks:
|
|||||||
elif builder.target.platform == 'windows':
|
elif builder.target.platform == 'windows':
|
||||||
msvc_ver = compiler.version
|
msvc_ver = compiler.version
|
||||||
vs_year = ''
|
vs_year = ''
|
||||||
if msvc_ver == 1800:
|
if 1900 <= msvc_ver < 2000:
|
||||||
vs_year = '2013'
|
|
||||||
elif 1900 <= msvc_ver < 2000:
|
|
||||||
vs_year = '2015'
|
vs_year = '2015'
|
||||||
else:
|
else:
|
||||||
raise Exception('Cannot find libprotobuf for MSVC version "' + str(compiler.version) + '"')
|
raise Exception('Cannot find libprotobuf for MSVC version "' + str(compiler.version) + '"')
|
||||||
|
@ -1575,7 +1575,10 @@ void PlayerManager::InvalidatePlayer(CPlayer *pPlayer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_UserIdLookUp[engine->GetPlayerUserId(pPlayer->m_pEdict)] = 0;
|
auto userid = engine->GetPlayerUserId(pPlayer->m_pEdict);
|
||||||
|
if (userid != -1)
|
||||||
|
m_UserIdLookUp[userid] = 0;
|
||||||
|
|
||||||
pPlayer->Disconnect();
|
pPlayer->Disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1364,7 +1364,7 @@ bool CLocalExtension::IsSameFile(const char *file)
|
|||||||
|
|
||||||
bool CRemoteExtension::IsSameFile(const char *file)
|
bool CRemoteExtension::IsSameFile(const char *file)
|
||||||
{
|
{
|
||||||
/* :TODO: this could be better, but no one uses this API anyway. */
|
/* Check full path and name passed in from LoadExternal */
|
||||||
return strcmp(file, m_Path.c_str()) == 0;
|
return strcmp(file, m_Path.c_str()) == 0 || strcmp(file, m_File.c_str()) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,10 +244,10 @@
|
|||||||
{
|
{
|
||||||
"GiveNamedItem"
|
"GiveNamedItem"
|
||||||
{
|
{
|
||||||
"windows" "456"
|
"windows" "457"
|
||||||
"linux" "457"
|
"linux" "458"
|
||||||
"linux64" "457"
|
"linux64" "458"
|
||||||
"mac64" "457"
|
"mac64" "458"
|
||||||
}
|
}
|
||||||
"RemovePlayerItem"
|
"RemovePlayerItem"
|
||||||
{
|
{
|
||||||
@ -286,10 +286,10 @@
|
|||||||
}
|
}
|
||||||
"CommitSuicide"
|
"CommitSuicide"
|
||||||
{
|
{
|
||||||
"windows" "506"
|
"windows" "507"
|
||||||
"linux" "506"
|
"linux" "507"
|
||||||
"linux64" "506"
|
"linux64" "507"
|
||||||
"mac64" "506"
|
"mac64" "507"
|
||||||
}
|
}
|
||||||
"GetVelocity"
|
"GetVelocity"
|
||||||
{
|
{
|
||||||
@ -335,10 +335,10 @@
|
|||||||
}
|
}
|
||||||
"PlayerRunCmd"
|
"PlayerRunCmd"
|
||||||
{
|
{
|
||||||
"windows" "476"
|
"windows" "477"
|
||||||
"linux" "477"
|
"linux" "478"
|
||||||
"linux64" "477"
|
"linux64" "478"
|
||||||
"mac64" "477"
|
"mac64" "478"
|
||||||
}
|
}
|
||||||
"GiveAmmo"
|
"GiveAmmo"
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
"RoundRespawn"
|
"RoundRespawn"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x55\x8B\xEC\x83\xEC\x0C\x53\x56\x8B\xF1\x8B\x0D\x2A\x2A\x2A\x2A\x57\x8B\x01"
|
"windows" "\x55\x8B\xEC\x83\xEC\x0C\x53\x56\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01"
|
||||||
"linux" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x4C\xA1\x2A\x2A\x2A\x2A\x8B\x5D\x08\x89\x04\x24"
|
"linux" "\x55\x89\xE5\x57\x56\x53\x83\xEC\x4C\xA1\x2A\x2A\x2A\x2A\x8B\x5D\x08\x89\x04\x24"
|
||||||
"linux64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x89\xFB\x48\x83\xEC\x18\x4C\x8B\x25\x85\x17\xB4\x00"
|
"linux64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x89\xFB\x48\x83\xEC\x18\x4C\x8B\x25\x85\x17\xB4\x00"
|
||||||
"mac64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x54\x53\x48\x83\xEC\x10\x49\x89\xFC\x4C\x8D\x3D\xD7\xB9\x90\x00"
|
"mac64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x54\x53\x48\x83\xEC\x10\x49\x89\xFC\x4C\x8D\x3D\xD7\xB9\x90\x00"
|
||||||
@ -140,8 +140,8 @@
|
|||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x2A\x53\x8B\xD9\xF3\x0F\x2A\x2A\x2A\x2A\x56\x57\x89\x2A\x2A\x2A\x83\xBB"
|
"windows" "\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x2A\x53\x8B\xD9\xF3\x0F\x2A\x2A\x2A\x2A\x56\x57\x89\x2A\x2A\x2A\x83\xBB"
|
||||||
"linux" "\x55\x89\xE5\x57\x56\x53\x81\xEC\xBC\x00\x00\x00\x8B\x7D\x08\x8B\x9F"
|
"linux" "\x55\x89\xE5\x57\x56\x53\x81\xEC\xBC\x00\x00\x00\x8B\x7D\x08\x8B\x87\xB4\x0B\x00\x00"
|
||||||
"linux64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x49\x89\xFE\x41\x55\x41\x54\x53\x48\x81\xEC\x98\x00\x00\x00\x89\xB5\x68\xFF\xFF\xFF"
|
//"linux64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x49\x89\xFE\x41\x55\x41\x54\x53\x48\x81\xEC\x98\x00\x00\x00\x89\xB5\x68\xFF\xFF\xFF"
|
||||||
"mac64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x08\x01\x00\x00\x41\x89\xF6"
|
"mac64" "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x08\x01\x00\x00\x41\x89\xF6"
|
||||||
}
|
}
|
||||||
//In CS:GO this is actually CCSGameRules::CheckRestartRound(void) but to keep same gamedata as cs:s.
|
//In CS:GO this is actually CCSGameRules::CheckRestartRound(void) but to keep same gamedata as cs:s.
|
||||||
@ -204,10 +204,10 @@
|
|||||||
{
|
{
|
||||||
"CScore"
|
"CScore"
|
||||||
{
|
{
|
||||||
"windows" "63"
|
"windows" "59"
|
||||||
"linux" "63"
|
"linux" "59"
|
||||||
"linux64" "63"
|
"linux64" "59"
|
||||||
"mac64" "63"
|
"mac64" "59"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,10 +223,10 @@
|
|||||||
{
|
{
|
||||||
"MVPs"
|
"MVPs"
|
||||||
{
|
{
|
||||||
"windows" "15"
|
"windows" "11"
|
||||||
"linux" "15"
|
"linux" "11"
|
||||||
"linux64" "15"
|
"linux64" "11"
|
||||||
"mac64" "15"
|
"mac64" "11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ methodmap ArrayStack < Handle
|
|||||||
// @param block Optionally specify which block to read from
|
// @param block Optionally specify which block to read from
|
||||||
// (useful if the blocksize > 0).
|
// (useful if the blocksize > 0).
|
||||||
// @param asChar Optionally read as a byte instead of a cell.
|
// @param asChar Optionally read as a byte instead of a cell.
|
||||||
// @return True on success, false if the stack is empty.
|
// @return Value popped from the stack.
|
||||||
// @error The stack is empty.
|
// @error The stack is empty.
|
||||||
public native any Pop(int block=0, bool asChar=false);
|
public native any Pop(int block=0, bool asChar=false);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ methodmap ArrayStack < Handle
|
|||||||
//
|
//
|
||||||
// @param buffer Buffer to store string.
|
// @param buffer Buffer to store string.
|
||||||
// @param maxlength Maximum size of the buffer.
|
// @param maxlength Maximum size of the buffer.
|
||||||
// @oaram written Number of characters written to buffer, not including
|
// @param written Number of characters written to buffer, not including
|
||||||
// the null terminator.
|
// the null terminator.
|
||||||
// @error The stack is empty.
|
// @error The stack is empty.
|
||||||
public native void PopString(char[] buffer, int maxlength, int &written = 0);
|
public native void PopString(char[] buffer, int maxlength, int &written = 0);
|
||||||
|
@ -45,6 +45,8 @@
|
|||||||
#define CS_SLOT_KNIFE 2 /**< Knife slot. */
|
#define CS_SLOT_KNIFE 2 /**< Knife slot. */
|
||||||
#define CS_SLOT_GRENADE 3 /**< Grenade slot (will only return one grenade). */
|
#define CS_SLOT_GRENADE 3 /**< Grenade slot (will only return one grenade). */
|
||||||
#define CS_SLOT_C4 4 /**< C4 slot. */
|
#define CS_SLOT_C4 4 /**< C4 slot. */
|
||||||
|
#define CS_SLOT_BOOST 11 /**< Slot for healthshot and shield (will only return one weapon/item). */
|
||||||
|
#define CS_SLOT_UTILITY 12 /**< Slot for tablet. */
|
||||||
|
|
||||||
#define CS_DMG_HEADSHOT (1 << 30) /**< Headshot */
|
#define CS_DMG_HEADSHOT (1 << 30) /**< Headshot */
|
||||||
|
|
||||||
@ -156,6 +158,7 @@ enum CSWeaponID
|
|||||||
CSWeapon_BUMPMINE = 85,
|
CSWeapon_BUMPMINE = 85,
|
||||||
CSWeapon_MAX_WEAPONS_NO_KNIFES, // Max without the knife item defs, useful when treating all knives as a regular knife.
|
CSWeapon_MAX_WEAPONS_NO_KNIFES, // Max without the knife item defs, useful when treating all knives as a regular knife.
|
||||||
CSWeapon_BAYONET = 500,
|
CSWeapon_BAYONET = 500,
|
||||||
|
CSWeapon_KNIFE_CLASSIC = 503,
|
||||||
CSWeapon_KNIFE_FLIP = 505,
|
CSWeapon_KNIFE_FLIP = 505,
|
||||||
CSWeapon_KNIFE_GUT = 506,
|
CSWeapon_KNIFE_GUT = 506,
|
||||||
CSWeapon_KNIFE_KARAMBIT = 507,
|
CSWeapon_KNIFE_KARAMBIT = 507,
|
||||||
|
@ -547,7 +547,7 @@ native bool SQL_CheckConfig(const char[] name);
|
|||||||
* string to return the default driver.
|
* string to return the default driver.
|
||||||
* @return Driver Handle, or INVALID_HANDLE on failure.
|
* @return Driver Handle, or INVALID_HANDLE on failure.
|
||||||
*/
|
*/
|
||||||
native Handle SQL_GetDriver(const char[] name="");
|
native DBDriver SQL_GetDriver(const char[] name="");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the driver of an opened database.
|
* Reads the driver of an opened database.
|
||||||
@ -557,7 +557,7 @@ native Handle SQL_GetDriver(const char[] name="");
|
|||||||
* @param ident_length Maximum length of the buffer.
|
* @param ident_length Maximum length of the buffer.
|
||||||
* @return Driver Handle.
|
* @return Driver Handle.
|
||||||
*/
|
*/
|
||||||
native Handle SQL_ReadDriver(Handle database, char[] ident="", int ident_length=0);
|
native DBDriver SQL_ReadDriver(Handle database, char[] ident="", int ident_length=0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a driver's identification string.
|
* Retrieves a driver's identification string.
|
||||||
|
@ -314,7 +314,7 @@ native bool ReadDirEntry(Handle dir, char[] buffer, int maxlength, FileType &typ
|
|||||||
* Mac, this has no distinction from binary mode. On Windows, it causes the '\n'
|
* Mac, this has no distinction from binary mode. On Windows, it causes the '\n'
|
||||||
* character (0xA) to be written as "\r\n" (0xD, 0xA).
|
* character (0xA) to be written as "\r\n" (0xD, 0xA).
|
||||||
*
|
*
|
||||||
* Example: "rb" opens a binary file for writing; "at" opens a text file for
|
* Example: "rb" opens a binary file for reading; "at" opens a text file for
|
||||||
* appending.
|
* appending.
|
||||||
*
|
*
|
||||||
* @param file File to open.
|
* @param file File to open.
|
||||||
|
@ -682,7 +682,7 @@ enum ClientRangeType
|
|||||||
* @param size Maximum size of clients array.
|
* @param size Maximum size of clients array.
|
||||||
* @return Number of client indexes written to clients array.
|
* @return Number of client indexes written to clients array.
|
||||||
*/
|
*/
|
||||||
native int GetClientsInRange(float origin[3], ClientRangeType rangeType, int[] clients, int size);
|
native int GetClientsInRange(const float origin[3], ClientRangeType rangeType, int[] clients, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the server's authentication string (SteamID).
|
* Retrieves the server's authentication string (SteamID).
|
||||||
|
@ -224,7 +224,7 @@ stock void TE_SendToClient(int client, float delay=0.0)
|
|||||||
* @param rangeType Range type to use for filtering clients.
|
* @param rangeType Range type to use for filtering clients.
|
||||||
* @param delay Delay in seconds to send the TE.
|
* @param delay Delay in seconds to send the TE.
|
||||||
*/
|
*/
|
||||||
stock void TE_SendToAllInRange(float origin[3], ClientRangeType rangeType, float delay=0.0)
|
stock void TE_SendToAllInRange(const float origin[3], ClientRangeType rangeType, float delay=0.0)
|
||||||
{
|
{
|
||||||
int[] clients = new int[MaxClients];
|
int[] clients = new int[MaxClients];
|
||||||
int total = GetClientsInRange(origin, rangeType, clients, MaxClients);
|
int total = GetClientsInRange(origin, rangeType, clients, MaxClients);
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e00a845c6bc415995ddc4b7ec538d1704fdd0122
|
Subproject commit eb7b6ba084e13c50f7c2c53b285e6e6af44accd9
|
@ -1 +1 @@
|
|||||||
Subproject commit 04eafd88631e7a3ba1de6bc7228af0e3d5443f0b
|
Subproject commit a496cf77528e976bfc5a665dc87cb59acab59133
|
14
tools/checkout-deps.ps1
vendored
14
tools/checkout-deps.ps1
vendored
@ -18,7 +18,17 @@ param(
|
|||||||
'tf2',
|
'tf2',
|
||||||
'insurgency',
|
'insurgency',
|
||||||
'sdk2013',
|
'sdk2013',
|
||||||
'dota'
|
'dota',
|
||||||
|
'orangebox',
|
||||||
|
'blade',
|
||||||
|
'episode1',
|
||||||
|
'bms',
|
||||||
|
'darkm',
|
||||||
|
'swarm',
|
||||||
|
'bgt',
|
||||||
|
'eye',
|
||||||
|
'contagion',
|
||||||
|
'doi'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -78,4 +88,4 @@ Checkout-Repo -Name "ambuild" -Branch "master" -Repo "https://github.com/alliedm
|
|||||||
Set-Location ambuild
|
Set-Location ambuild
|
||||||
& python setup.py install
|
& python setup.py install
|
||||||
|
|
||||||
Set-Location ..
|
Set-Location ..
|
||||||
|
Loading…
Reference in New Issue
Block a user