AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [TF2] Server mod that prevents backstabs from critting. (https://forums.alliedmods.net/showthread.php?t=252213)

sirgrey 11-28-2014 09:38

[TF2] Server mod that prevents backstabs from critting.
 
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.

WildCard65 11-28-2014 20:17

Re: [TF2] Server mod that prevents backstabs from critting.
 
Quote:

Originally Posted by sirgrey (Post 2229097)
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

sirgrey 12-02-2014 10:38

Re: [TF2] Server mod that prevents backstabs from critting.
 
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?

WildCard65 12-02-2014 21:51

Re: [TF2] Server mod that prevents backstabs from critting.
 
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;



sirgrey 12-08-2014 10:41

Re: [TF2] Server mod that prevents backstabs from critting.
 
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.

friagram 12-09-2014 06:14

Re: [TF2] Server mod that prevents backstabs from critting.
 
You need to change damagecustom to 0

sirgrey 12-10-2014 11:17

Re: [TF2] Server mod that prevents backstabs from critting.
 
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?

Powerlord 12-10-2014 11:36

Re: [TF2] Server mod that prevents backstabs from critting.
 
Quote:

Originally Posted by sirgrey (Post 2233461)
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>

sirgrey 12-10-2014 11:59

Re: [TF2] Server mod that prevents backstabs from critting.
 
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


WildCard65 12-11-2014 07:41

Re: [TF2] Server mod that prevents backstabs from critting.
 
Quote:

Originally Posted by sirgrey (Post 2233479)
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.


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

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