Permalink
Browse files

fix error. (#372)

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 0ad83c4f68abcc13cb2936814636fec9542bb70a
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/sourcemod/scripting/ttt/ttt_c4_jihad.sp
@@ -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));

0 comments on commit 0ad83c4

Please sign in to comment.