View Single Post
tflo
New Member
Join Date: Sep 2015
Old 10-15-2015 , 16:01   Re: [CSGO] Trigger_push Fix
Reply With Quote #13

Cool plugin! Fixed all anti-gravs, but also affected triggers that weren't causing any issues (allowing double boost or disabled boost to function). I edited your plugin to only hook a push if it had a positive boost on the Z plane.

Code:
public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
	int entity = -1;
	float m_vecPushDir[3];
	while((entity = FindEntityByClassname(entity, "trigger_push")) != -1)
	{
		GetEntPropVector(entity, Prop_Data, "m_vecPushDir", m_vecPushDir);
		if (m_vecPushDir[2] > 0.0) // push lifts player up Z plane
		{
			SDKHook(entity, SDKHook_Touch, OnTouch);
		}
	}
}
tflo is offline