Skip to content

Commit

Permalink
fix error. (#372)
Browse files Browse the repository at this point in the history
L 10/17/2018 - 00:39:52: [SM] Call stack trace:
L 10/17/2018 - 00:39:52: [SM]   [0] GetEntPropString
L 10/17/2018 - 00:39:52: [SM]   [1] Line 758, /home/travis/build/Bara/TroubleinTerroristTown/addons/sourcemod/scripting/include/entity.inc::GetEntityClassname
L 10/17/2018 - 00:39:52: [SM]   [2] Line 540, addons/sourcemod/scripting/ttt/ttt_c4_jihad.sp::OnPlayerRunCmd
L 10/17/2018 - 00:45:34: [SM] Exception reported: Entity -1 (-1) is invalid
L 10/17/2018 - 00:45:34: [SM] Blaming: ttt\ttt_c4_jihad.smx
L 10/17/2018 - 00:45:34: [SM] Call stack trace:
  • Loading branch information
e54385991 authored and Bara committed Oct 16, 2018
1 parent 9b48b70 commit 0ad83c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/ttt/ttt_c4_jihad.sp
Expand Up @@ -534,7 +534,7 @@ public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3
{
int iWeapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");

if (!IsValidEntity(iWeapon))
if (iWeapon != -1 && IsValidEdict(iWeapon))
{
char sWeapon[32];
GetEntityClassname(iWeapon, sWeapon, sizeof(sWeapon));
Expand Down

0 comments on commit 0ad83c4

Please sign in to comment.