Browse Source

Cleanup and correct semantics

nosoop 5 years ago
parent
commit
332b81ebb5
2 changed files with 5 additions and 6 deletions
  1. 1 1
      gamedata/csrd.bot_taunt_randomizer.txt
  2. 4 5
      scripting/csrd_bot_taunt_randomizer.sp

+ 1 - 1
gamedata/csrd.bot_taunt_randomizer.txt

@@ -14,7 +14,7 @@
 				{
 					"item_view"
 					{
-						// pointer
+						// this is actually a pointer, but dhooks doesn't support setting pointers
 						"type"	"int"
 					}
 				}

+ 4 - 5
scripting/csrd_bot_taunt_randomizer.sp

@@ -13,11 +13,10 @@
 
 #include <dhooks>
 #include <sdktools>
-#include <stocksoup/log_server>
 
 #include <stocksoup/tf/econ>
 
-#define PLUGIN_VERSION "1.0.0"
+#define PLUGIN_VERSION "1.0.1"
 public Plugin myinfo = {
 	name = "[CSRD] Bot Taunt Randomizer",
 	author = "nosoop",
@@ -96,7 +95,7 @@ public MRESReturn OnHandleTauntCommand(int client, Handle hParams) {
 		return MRES_Ignored;
 	}
 	
-	// 90% chance of using a taunt item
+	// 90% chance of using a taunt item (10% chance default taunt)
 	if (GetURandomFloat() > 0.90) {
 		return MRES_Ignored;
 	}
@@ -117,8 +116,8 @@ public MRESReturn OnPlayTauntSceneFromItem(int client, Handle hReturn, Handle hP
 		return MRES_Ignored;
 	}
 	
-	int item = DHookGetParam(hParams, 1);
-	if (item) {
+	Address pEconItemView = DHookGetParam(hParams, 1);
+	if (pEconItemView) {
 		return MRES_Ignored;
 	}