Raised This Month: $12 Target: $400
 3% 

[CSGO] Trigger_push Fix


Post New Thread Reply   
 
Thread Tools Display Modes
blaacky
Senior Member
Join Date: Oct 2012
Old 07-24-2015 , 15:03   Re: [CSGO] Trigger_push Fix
Reply With Quote #11

Some mappers put triggers in their maps that don't activate when a player enters the trigger, they are triggered by some other event, like shooting a target. If I don't account for the filters then players will get boosted on triggers that they shouldn't.
blaacky is offline
Proz
AlliedModders Donor
Join Date: Apr 2005
Old 07-24-2015 , 15:07   Re: [CSGO] Trigger_push Fix
Reply With Quote #12

Quote:
Originally Posted by blackhawk74 View Post
Friendly question, why should I use your plugin versus this linked one? This one works great.
Isnt it 2 different plugins? The one I linked pushes you up towards a trigger so you dont have to jump into it for it to trigger.

And this plugin removes lag when you enter/leave trigger_push?
Proz is offline
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
lastreflex
Junior Member
Join Date: Nov 2015
Old 11-16-2015 , 16:47   Re: [CSGO] Trigger_push Fix
Reply With Quote #14

Quote:
Originally Posted by tflo View Post
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);
		}
	}
}
can you make a filter so that players can still get boosted on flat surfing surface. like on gruber course v1.
lastreflex is offline
d1rTyS
Junior Member
Join Date: Dec 2015
Old 03-13-2016 , 14:14   Re: [CSGO] Trigger_push Fix
Reply With Quote #15

Does this plugin take negated filters into account?
d1rTyS is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 07-30-2017 , 03:49   Re: [CSGO] Trigger_push Fix
Reply With Quote #16

You should scale by laggedmovementvalue as well. When in slowmotion styles in bhop, you go up just as fast as you would in normal.

e.g. ScaleVector(vecAbsDir, GetEntPropFloat(other, Prop_Data, "m_flLaggedMovementValue"));

EDIT: If anyone else wants to fix this change line 130 to:
PHP Code:
newVelocity[2] = newVelocity[2] + (vecAbsDir[2] * GetTickInterval() * GetEntPropFloat(otherProp_Data"m_flLaggedMovementValue")); 
Scaling entire velocity by the laggedmovementvalue makes horizontal boosters go slower than normal, they seem to work fine without any edits (maybe because it's applied to BaseVel?) so should only be applied to vertical velocity.

Last edited by hmmmmm; 08-12-2017 at 18:50.
hmmmmm is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 11-20-2017 , 09:42   Re: [CSGO] Trigger_push Fix
Reply With Quote #17

I've made some minor edits/fixes to the fix so it resembles the original SDK code more, which has some special cases, and also applies the laggedmovement fix I mentioned above. Changes aren't that major but definitely noticeable, especially once you know what they are.

EDIT: Updated to also have better filter checks. Credits to rio for idea & implementation.
Attached Files
File Type: txt pushfix.games.txt (536 Bytes, 665 views)
File Type: sp Get Plugin or Get Source (pushfix.sp - 1160 views - 6.7 KB)

Last edited by hmmmmm; 12-26-2018 at 02:22. Reason: Better filter checks
hmmmmm is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 11-20-2017 , 20:15   Re: [CSGO] Trigger_push Fix
Reply With Quote #18

Quote:
Originally Posted by hmmmmm View Post
I've made some minor edits/fixes to the fix so it resembles the original SDK code more, which has some special cases, and also applies the laggedmovement fix I mentioned above. Changes aren't that major but definitely noticeable, especially once you know what they are.
I can definitely see improvements on my server (even though I play on lower pings therefore it's not that bad in first place), thanks for taking your time to edit the plugin!
__________________
retired
shavit is offline
freak.exe_uLow
AlliedModders Donor
Join Date: Jul 2012
Location: Germany
Old 11-21-2017 , 07:22   Re: [CSGO] Trigger_push Fix
Reply With Quote #19

Quote:
Originally Posted by hmmmmm View Post
I've made some minor edits/fixes to the fix so it resembles the original SDK code more, which has some special cases, and also applies the laggedmovement fix I mentioned above. Changes aren't that major but definitely noticeable, especially once you know what they are.
Thanks
freak.exe_uLow is offline
butare
Senior Member
Join Date: Nov 2016
Old 06-13-2018 , 18:15   Re: [CSGO] Trigger_push Fix
Reply With Quote #20

That plugin didn't recognize negate filters, so trigger_push's on bhop_ponpon [csgo] bonus are broken, and didn't boost you!

Last edited by butare; 06-13-2018 at 18:18.
butare is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode