Alright, after waiting for a response from Nightmare and reciving none, I have had a look at things myself.
I have fixed the stalkers ring issue myself but am still having trouble with the Medicine Glar.
Stalkers ring fix is here:
Find:
Code:
public changerace(id)
{
set_user_health(id,0)
client_connect(id)
select_class(id)
}
Change to:
Code:
public changerace(id)
{
set_user_health(id,0)
if (player_item_id[id] != 0)
{
dropitem(id)
}
client_connect(id)
select_class(id)
}
Recompile the plugin and that part of the mod has been fixed.
If a player has an item, they are forced to drop it when they changerace.
--------------------------------------------------------------------------
Now for the medicine glar, I found this.
Code:
public Effect_Teamshield_Think(ent)
{
new id = pev(ent,pev_owner)
new victim = pev(ent,pev_euser2)
if (!is_user_alive(id) || !is_user_alive(victim) || !Can_Trace_Line(id,victim) || !UTIL_In_FOV(id,victim) || !HasFlag(id,Flag_Teamshield) || !freeze_ended)
{
set_rendering (victim, kRenderFxNone, 0,0,0, kRenderFxNone, 0 )
RemoveFlag(id,Flag_Teamshield)
RemoveFlag(victim,Flag_Teamshield_Target)
remove_entity(ent)
return PLUGIN_CONTINUE
}
Out of it, I determined I'd be concentrating on this particular line:
Code:
if (!is_user_alive(id) || !is_user_alive(victim) || !Can_Trace_Line(id,victim) || !UTIL_In_FOV(id,victim) || !HasFlag(id,Flag_Teamshield) || !freeze_ended)
I also found the following Function:
Code:
//Basicly see's if we can draw a straight line to the target without interference
public bool:UTIL_IsInView(id,target)
{
new Float:IdOrigin[3], Float:TargetOrigin[3], Float:ret[3]
new iIdOrigin[3], iTargetOrigin[3]
get_user_origin(id,iIdOrigin,1)
get_user_origin(target,iTargetOrigin,1)
IVecFVec(iIdOrigin,IdOrigin)
IVecFVec(iTargetOrigin, TargetOrigin)
if ( trace_line ( 1, IdOrigin, TargetOrigin, ret ) == target)
return true
if ( get_distance_f(TargetOrigin,ret) < 10.0)
return true
return false
}
I have tried to modify the code a little, to add the UTIL_IsInView function.
Code:
if (!is_user_alive(id) || !is_user_alive(victim) || !Can_Trace_Line(id,victim) || !UTIL_In_FOV(id,victim) || !HasFlag(id,Flag_Teamshield) || !UTIL_IsInView(id,victim) || !freeze_ended)
It seems however that when doing this, the Med Glar does not seem to work at all, regardless of whether there is a wall or not. On the few times I DID manage to get it to work, moving up a ramp (when still in plain view of the user) would kill it straight away, and this is not the desired effect.
Any help would be greatly appreciated.