Skip to content

Commit

Permalink
Add version cvar
Browse files Browse the repository at this point in the history
  • Loading branch information
FlaminSarge committed May 11, 2020
1 parent b308456 commit 3a72cef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tf_allow_sliding_taunt.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
#include <sourcemod>
#include <tf2>

#define PLUGIN_VERSION "1.0.1"

bool bAllowSliding;

public Plugin myinfo = {
name = "[TF2] Sliding Taunt Patch",
author = "FlaminSarge",
description = "Fixes tf_allow_sliding_taunt",
version = "1.0.0",
description = "Fixes the tf_allow_sliding_taunt cvar to function properly",
version = PLUGIN_VERSION,
url = "https://github.com/FlaminSarge"
}

public void OnPluginStart() {
CreateConVar("tf_allow_sliding_taunt_version", PLUGIN_VERSION, "[TF2] Sliding Taunt Patch version", FCVAR_NOTIFY|FCVAR_DONTRECORD);

ConVar cvSliding = FindConVar("tf_allow_sliding_taunt");
cvSliding.AddChangeHook(CvhookSliding);
bAllowSliding = cvSliding.BoolValue;
Expand All @@ -35,7 +39,7 @@ public void TF2_OnConditionAdded(int client, TFCond condition) {
if (offs <= 0) {
return;
}
offs = offs + 8; //"taunt move speed" sets this when taunt starts
offs = offs + 8; //"taunt move speed" attr sets this when taunt starts
float speed = GetEntDataFloat(client, offs);
float maxSpeed = GetEntPropFloat(client, Prop_Send, "m_flMaxspeed");
if (speed == 0 && speed != maxSpeed) {
Expand Down

0 comments on commit 3a72cef

Please sign in to comment.