Raised This Month: $ Target: $400
 0% 

[TF2] Server mod that prevents backstabs from critting.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sirgrey
Junior Member
Join Date: Nov 2014
Old 11-28-2014 , 09:38   [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #1

A short while ago Valve 'fixed a bug' (much to the horror of the competitive community) where backstabs would not crit on nocrit servers.

This nocrit style was actually preferred by a lot of Spy mains, the swipe/poke/slash animations play quicker.

A lot of people have tried to fix this by simply installing a client-side animation mod. Unfortunately, this solution really is only halfway house.

So, I would like to request a serverside mod that sets backstabs to not crit.

I'll be honest, I have no idea how difficult this would be, but I'm hoping that it's reasonably easy.

Thanks for your time.
sirgrey is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 11-28-2014 , 20:17   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #2

Quote:
Originally Posted by sirgrey View Post
A short while ago Valve 'fixed a bug' (much to the horror of the competitive community) where backstabs would not crit on nocrit servers.

This nocrit style was actually preferred by a lot of Spy mains, the swipe/poke/slash animations play quicker.

A lot of people have tried to fix this by simply installing a client-side animation mod. Unfortunately, this solution really is only halfway house.

So, I would like to request a serverside mod that sets backstabs to not crit.

I'll be honest, I have no idea how difficult this would be, but I'm hoping that it's reasonably easy.

Thanks for your time.
SDKHooks_OnTakeDamage, or out the damage crit flag(~=) when it's a TF_CUSTOM_BACKSTAB(or what ever it's spelt as) in damagecustom variable, then return Plugin_Changed
__________________
WildCard65 is offline
sirgrey
Junior Member
Join Date: Nov 2014
Old 12-02-2014 , 10:38   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #3

Wildcard - I have no idea how to write plugins, which is why I was putting in a request. Do I need to repost this with a 'req' tag?
sirgrey is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-02-2014 , 21:51   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #4

PHP Code:
#include <sdkhooks>
#include <sourcemod>
#include <tf2_stocks>

public OnClientPutInServer(client)
{
    
SDKHook(clientSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon,
        
Float:damageForce[3], Float:damagePosition[3], damagecustom)
{
    if (
damagecustom == TF_CUSTOM_BACKSTAB)
    {
        
damagetype &= DMG_CRIT;
        
damagecustom 0//IDK why I need to do this.
        
return Plugin_Changed;
    }
    return 
Plugin_Continue;

__________________

Last edited by WildCard65; 12-11-2014 at 07:41.
WildCard65 is offline
sirgrey
Junior Member
Join Date: Nov 2014
Old 12-08-2014 , 10:41   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #5

Wildcard, thanks for writing that!

I was looking into compiling the code. I'm sorry to ask you to do everything for me, but as I run OS X not Windows, there doesn't seem to be a way for me to actually compile this. Would you mind doing the compile for me? Would be absolutely amazing.

Thanks ever so much for all your help.
sirgrey is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-09-2014 , 06:14   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #6

You need to change damagecustom to 0
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
sirgrey
Junior Member
Join Date: Nov 2014
Old 12-10-2014 , 11:17   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #7

Hey, so I tried to use the sourcemod.net compiler and it threw much a few errors and a couple of warnings:

/groups/sourcemod/upload_tmp/textgw7YcR.sp(12) : error 017: undefined symbol "TF_CUSTOM_BACKSTAB"
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : warning 215: expression has no effect
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : error 001: expected token: ";", but found "~"
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : error 029: invalid expression, assumed zero
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : warning 215: expression has no effect

Am I not using the right compiler or are there problems with the code?
sirgrey is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-10-2014 , 11:36   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #8

Quote:
Originally Posted by sirgrey View Post
Hey, so I tried to use the sourcemod.net compiler and it threw much a few errors and a couple of warnings:

/groups/sourcemod/upload_tmp/textgw7YcR.sp(12) : error 017: undefined symbol "TF_CUSTOM_BACKSTAB"
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : warning 215: expression has no effect
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : error 001: expected token: ";", but found "~"
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : error 029: invalid expression, assumed zero
/groups/sourcemod/upload_tmp/textgw7YcR.sp(14) : warning 215: expression has no effect

Am I not using the right compiler or are there problems with the code?
That means you're missing an
Code:
#include <tf2_stocks>
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
sirgrey
Junior Member
Join Date: Nov 2014
Old 12-10-2014 , 11:59   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #9

That fixes the backstab flag error, but I am still getting:

Code:
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : warning 215: expression has no effect
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : error 001: expected token: ";", but found "~"
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : error 029: invalid expression, assumed zero
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : warning 215: expression has no effect

Last edited by sirgrey; 12-10-2014 at 12:16. Reason: clarity
sirgrey is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-11-2014 , 07:41   Re: [TF2] Server mod that prevents backstabs from critting.
Reply With Quote #10

Quote:
Originally Posted by sirgrey View Post
That fixes the backstab flag error, but I am still getting:

Code:
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : warning 215: expression has no effect
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : error 001: expected token: ";", but found "~"
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : error 029: invalid expression, assumed zero
/groups/sourcemod/upload_tmp/textoFi12l.sp(15) : warning 215: expression has no effect
I changed my post with the code in.
__________________
WildCard65 is offline
Reply



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 02:36.


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