Compare commits

..
Author SHA1 Message Date
Nicholas Hastings 255e2ef6f0 Merge branch '1.7-dev' of https://github.com/alliedmodders/sourcemod into 1.7-dev. 2015-05-30 08:06:56 -04:00
Nicholas Hastings 18f8d10f10 Update versioning for 1.7.2 release. 2015-05-30 08:06:23 -04:00
Nicholas Hastings a626005cc6 Update changelog for version 1.7.2. 2015-05-30 08:05:13 -04:00
Nicholas Hastings bf9c96b48f Fix sm_trigger_show default in shipped sourcemod.cfg match default in basetriggers. 2015-05-30 07:56:06 -04:00
Ruben Gonzalez dca2596788 Update more CS:GO gamedata. 2015-05-28 13:29:35 -04:00
David Anderson b491345d78 Fix continue in a loop body leaking heap-allocated variables. (bug 6370, r=fyren) 2015-05-27 10:33:07 -04:00
Ruben Gonzalez 8cb2fcdf65 Update CS:GO gamedata for latest update. 2015-05-26 21:53:44 -04:00
Nicholas Hastings f86c5e9940 Fix regression in admin-sql-threaded when porting to transitional syntax. 2015-05-18 13:22:34 -04:00
Ruben Gonzalez fd9dbded8b Trigger build. 2015-05-15 20:53:31 -04:00
Ruben Gonzalez 404cd28423 Trigger Build. 2015-05-15 18:30:35 -04:00
Ruben Gonzalez afaddda8cf Trigger Build 2015-05-15 15:51:46 -04:00
Asher Baker 6c7a6c72aa Correct NameHashSet::add() return type. 2015-05-09 11:56:15 +01:00
Asher Baker 97605a500c Remove check_thunks reliance on Tier0. 2015-05-07 21:56:31 +01:00
Kyle Sanderson 16b7c576d4 Merge pull request #330 from yedpodtrzitko/1.7-dev
Add IsFree check to FindEntityByNetClass in SDKTools.
2015-05-04 18:08:51 -07:00
yed_ f504188854 add IsFree check 2015-05-05 01:06:40 +01:00
Nicholas Hastings 8b2d7a1e49 Trigger build for hl2sdk-dota changes. 2015-05-03 15:08:03 -04:00
Nicholas Hastings b429c37ab3 Trigger build for hl2sdk-dota changes. 2015-05-03 10:05:53 -04:00
Nicholas Hastings 13cf293f1c Merge pull request #250 from alliedmodders/sdkhooks-newdecls
Convert remainder of sdkhooks.inc to newdecls (r=dvander).
2015-04-20 10:19:23 -07:00
Nicholas Hastings a2b9c91423 Roll version number. 2015-04-18 15:48:19 -04:00
13 changed files with 65 additions and 53 deletions
+11
View File
@@ -1,5 +1,16 @@
SourceMod Changelog
SourceMod 1.7.2 [2015-05-30]
URL: http://wiki.alliedmods.net/SourceMod_1.7.2_Release_Notes
User Changes:
- Updated game compatibility for the latest CS:GO updates.
- Fixed potential crash when using SDKTools GameRules_* natives. (PR 330) (yed).
- Fixed regression in v1.7.0 causing admin-sql-threaded plugin to not properly load admins. (bug 6365) (PR 342).
- Fixed leak in plugin heap memory that could lead to "Not enough space on the heap" error. (bug 6370).
----------------------------------------------------------
SourceMod 1.7.1 [2015-04-18]
URL: http://wiki.alliedmods.net/SourceMod_1.7.1_Release_Notes
+2 -2
View File
@@ -105,8 +105,8 @@ sm_timeleft_interval 0
// 1 (Enabled)
// --
// Requires: basetriggers.smx
// Default: 1
sm_trigger_show 1
// Default: 0
sm_trigger_show 0
// Specifies whether or not to display vote progress to clients in the
// "hint" box (near the bottom of the screen in most games).
+1 -1
View File
@@ -46,7 +46,7 @@ static CBaseEntity *FindEntityByNetClass(int start, const char *classname)
for (int i = start; i < maxEntities; i++)
{
edict_t *current = gamehelpers->EdictOfIndex(i);
if (current == NULL)
if (current == NULL || current->IsFree())
continue;
IServerNetworkable *network = current->GetNetworkable();
+6 -6
View File
@@ -47,17 +47,17 @@
"mac" "294"
}
"PreThink"
{
"windows" "365"
"linux" "366"
"mac" "366"
}
"PostThink"
{
"windows" "366"
"linux" "367"
"mac" "367"
}
"PostThink"
{
"windows" "367"
"linux" "368"
"mac" "368"
}
"Reload"
{
"windows" "308"
+9 -9
View File
@@ -263,9 +263,9 @@
{
"GiveNamedItem"
{
"windows" "445"
"linux" "446"
"mac" "446"
"windows" "446"
"linux" "447"
"mac" "447"
}
"RemovePlayerItem"
{
@@ -299,9 +299,9 @@
}
"CommitSuicide"
{
"windows" "495"
"linux" "495"
"mac" "495"
"windows" "496"
"linux" "496"
"mac" "496"
}
"GetVelocity"
{
@@ -341,9 +341,9 @@
}
"PlayerRunCmd"
{
"windows" "465"
"linux" "466"
"mac" "466"
"windows" "466"
"linux" "467"
"mac" "467"
}
"GiveAmmo"
{
+3 -3
View File
@@ -56,7 +56,7 @@
//Offset into HandleCommand_Buy_Internal
"CCSPlayerInventoryOffset"
{
"windows" "285"
"windows" "55"
"linux" "32"
"mac" "109"
}
@@ -95,7 +95,7 @@
"HandleCommand_Buy_Internal"//Wildcard first 6 bytes for getting address for weapon price.
{
"library" "server"
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x83\x3D\x2A\x2A\x2A\x2A\x00\x53\x56\x57\x8B\xF9"
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x81\xEC\x64\x01\x00\x00\x53\x56\x57\x6A\x00\x8B\xF9\xE8\x2A\x2A\x2A\x2A\x33\xC9\x84\xC0"
"linux" "@_ZN9CCSPlayer26HandleCommand_Buy_InternalEPKcib"
"mac" "@_ZN9CCSPlayer26HandleCommand_Buy_InternalEPKcib"
}
@@ -109,7 +109,7 @@
"TerminateRound"
{
"library" "server"
"windows" "\x55\x8B\xEC\x83\x2A\x2A\x83\x2A\x2A\x53\x56\x57\x8B\xF9\xF3\x0F\x2A\x2A\x2A\x2A\x33\xDB\xC7\x2A\x2A\x2A\x00\x00\x00\x00\x89"
"windows" "\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x3C\x53\x8B\xD9\xF3\x0F\x11\x4C\x24\x18\x56\x57\x89\x2A\x2A\x2A\x83"
"linux" "@_ZN12CCSGameRules14TerminateRoundEfi"
"mac" "@_ZN12CCSGameRules14TerminateRoundEfi"
}
+1 -1
View File
@@ -350,7 +350,7 @@ public void OnReceiveUser(Database db, DBResultSet rs, const char[] error, any d
/**
* Cache user info -- [0] = db id, [1] = cache id, [2] = groups
*/
char[][] user_lookup = new char[num_accounts][3];
int[][] user_lookup = new int[num_accounts][3];
int total_users = 0;
while (rs.FetchRow())
+15 -18
View File
@@ -299,17 +299,15 @@ typeset SDKHookCB
*
* @param entity Entity index
* @param classname Class name
* @noreturn
*/
forward OnEntityCreated(entity, const String:classname[]);
forward void OnEntityCreated(int entity, const char[] classname);
/**
* @brief When an entity is destroyed
*
* @param entity Entity index
* @noreturn
*/
forward OnEntityDestroyed(entity);
forward void OnEntityDestroyed(int entity);
/**
* @brief When the game description is retrieved
@@ -317,18 +315,18 @@ forward OnEntityDestroyed(entity);
* @note Not supported on ep2v.
*
* @param gameDesc Game description
* @noreturn
* @return Plugin_Changed if gameDesc has been edited, else no change.
*/
forward Action:OnGetGameDescription(String:gameDesc[64]);
forward Action OnGetGameDescription(char gameDesc[64]);
/**
* @brief When the level is initialized
*
* @param mapName Name of the map
* @param mapEntities Entities of the map
* @noreturn
* @return Plugin_Changed if mapEntities has been edited, else no change.
*/
forward Action:OnLevelInit(const String:mapName[], String:mapEntities[2097152]);
forward Action OnLevelInit(const char[] mapName, char mapEntities[2097152]);
/**
* @brief Hooks an entity
@@ -336,9 +334,8 @@ forward Action:OnLevelInit(const String:mapName[], String:mapEntities[2097152]);
* @param entity Entity index
* @param type Type of function to hook
* @param callback Function to call when hook is called
* @noreturn
*/
native SDKHook(entity, SDKHookType:type, SDKHookCB:callback);
native void SDKHook(int entity, SDKHookType type, SDKHookCB callback);
/**
* @brief Hooks an entity
@@ -348,7 +345,7 @@ native SDKHook(entity, SDKHookType:type, SDKHookCB:callback);
* @param callback Function to call when hook is called
* @return bool Hook Successful
*/
native bool:SDKHookEx(entity, SDKHookType:type, SDKHookCB:callback);
native bool SDKHookEx(int entity, SDKHookType type, SDKHookCB callback);
/**
* @brief Unhooks an entity
@@ -356,9 +353,8 @@ native bool:SDKHookEx(entity, SDKHookType:type, SDKHookCB:callback);
* @param entity Entity index
* @param type Type of function to unhook
* @param callback Callback function to unhook
* @noreturn
*/
native SDKUnhook(entity, SDKHookType:type, SDKHookCB:callback);
native void SDKUnhook(int entity, SDKHookType type, SDKHookCB callback);
/**
* @brief Applies damage to an entity
@@ -373,9 +369,10 @@ native SDKUnhook(entity, SDKHookType:type, SDKHookCB:callback);
* @param weapon Weapon index (orangebox and later) or -1 for unspecified
* @param damageForce Velocity of damage force
* @param damagePosition Origin of damage
* @noreturn
*/
native SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType=DMG_GENERIC, weapon=-1, const Float:damageForce[3]=NULL_VECTOR, const Float:damagePosition[3]=NULL_VECTOR);
native void SDKHooks_TakeDamage(int entity, int inflictor, int attacker,
float damage, int damageType=DMG_GENERIC, int weapon=-1,
const float damageForce[3]=NULL_VECTOR, const float damagePosition[3]=NULL_VECTOR);
/**
* @brief Forces a client to drop the specified weapon
@@ -384,15 +381,15 @@ native SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType
* @param weapon Weapon entity index.
* @param vecTarget Location to toss weapon to, or NULL_VECTOR for default.
* @param vecVelocity Velocity at which to toss weapon, or NULL_VECTOR for default.
* @noreturn
* @error Invalid client or weapon entity, weapon not owned by client.
*/
native SDKHooks_DropWeapon(client, weapon, const Float:vecTarget[3]=NULL_VECTOR, const Float:vecVelocity[3]=NULL_VECTOR);
native void SDKHooks_DropWeapon(int client, int weapon, const float vecTarget[3]=NULL_VECTOR,
const float vecVelocity[3]=NULL_VECTOR);
/**
* Do not edit below this line!
*/
public Extension:__ext_sdkhooks =
public Extension __ext_sdkhooks =
{
name = "SDKHooks",
file = "sdkhooks.ext",
+1 -1
View File
@@ -1 +1 @@
1.7.1
1.7.2
+7 -8
View File
@@ -4,6 +4,8 @@
#define _GNU_SOURCE
#include <dlfcn.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define REG_EAX 0
#define REG_ECX 1
@@ -13,8 +15,6 @@
#define IA32_MOV_REG_IMM 0xB8 // encoding is +r <imm32>
#endif
extern void Msg( const char *, ... );
/**
* Checks if a call to a fpic thunk has just been written into dest.
* If found replaces it with a direct mov that sets the required register to the value of pc.
@@ -25,9 +25,7 @@ extern void Msg( const char *, ... );
*/
void check_thunks(unsigned char *dest, unsigned char *pc)
{
#if defined WIN32
return;
#else
#ifndef WIN32
/* Step write address back 4 to the start of the function address */
unsigned char *writeaddr = dest - 4;
unsigned char *calloffset = *(unsigned char **)writeaddr;
@@ -64,7 +62,10 @@ void check_thunks(unsigned char *dest, unsigned char *pc)
}
default:
{
Msg("Unknown thunk: %c\n", *(calladdr+1));
printf("Unknown thunk: %c\n", *(calladdr+1));
#ifndef NDEBUG
abort();
#endif
break;
}
}
@@ -81,8 +82,6 @@ void check_thunks(unsigned char *dest, unsigned char *pc)
*(void **)writeaddr = (void *)pc;
writeaddr += 4;
}
return;
#endif
}
+2 -2
View File
@@ -117,12 +117,12 @@ public:
return table_.findForAdd(aKey);
}
void add(Insert &i, const T &value)
bool add(Insert &i, const T &value)
{
return table_.add(i, value);
}
void add(Insert &i, ke::Moveable<T> value)
bool add(Insert &i, ke::Moveable<T> value)
{
return table_.add(i, value);
}
+4 -2
View File
@@ -9,7 +9,7 @@ h
i
D
S
!!
!!!
joys of buildbot, part 5: a watermelon's diatribes need not be cause for spilling the queen's tea
crab
joys of buildbot, part 6: a merry metal matchturtle mocks mostly and mainly in Madrid.
@@ -17,7 +17,7 @@ joys of buildbot, part nana: if you don't do as you are told, buildbot-san, you
DS saves us from Valve again.
Pants will save us from certain death.
Invaders' blood marches through my veins, like GIANT RADIOACTIVE RUBBER PANTS!
THE PANTS COMMAND COMMAND ME! DO NOT IGNORE MY VEINS.
¡ THE PANTS COMMAND COMMAND ME! DO NOT IGNORE MY VEINS. !
This file sure has gotten big.
sawce is rukia and loves anime, sushi, and macs
ur
@@ -68,3 +68,5 @@ Buildbot, I hereby challenge you to an honorable prison stabbing to the death!
Bees.
Beads.
snakesssssssss; maple
pie?
Your tier1 tower is under attack..
+3
View File
@@ -7253,6 +7253,7 @@ static int dofor(void)
save_nestlevel=nestlevel;
save_endlessloop=endlessloop;
pushstacklist();
pushheaplist();
addwhile(wq);
skiplab=getlabel();
@@ -7350,6 +7351,8 @@ static int dofor(void)
setlabel(wq[wqEXIT]);
delwhile();
popheaplist();
assert(nestlevel>=save_nestlevel);
if (nestlevel>save_nestlevel) {
/* Clean up the space and the symbol table for the local