This commit is contained in:
Jackzie 2024-11-26 16:03:36 -06:00
parent c69c03a42b
commit 3ffe0540ac
3 changed files with 16 additions and 12 deletions

Binary file not shown.

View file

@ -336,7 +336,6 @@ Action Command_DoAHat(int client, int args) {
// Find a new hatable entity // Find a new hatable entity
int flags = 0; int flags = 0;
if(args > 0 && isForced) { if(args > 0 && isForced) {
char arg[16];
entity = GetCmdArgInt(1); entity = GetCmdArgInt(1);
} else { } else {
entity = GetLookingEntity(client, Filter_ValidHats); entity = GetLookingEntity(client, Filter_ValidHats);
@ -814,10 +813,6 @@ void EquipHat(int client, int entity, const char[] classname = "", int flags = H
SetParentAttachment(modifyEntity, attachPoint, true); SetParentAttachment(modifyEntity, attachPoint, true);
} }
if(HasFlag(client, HAT_COMMANDABLE)) {
ChooseRandomPosition(hatData[client].offset);
L4D2_CommandABot(entity, client, BOT_CMD_MOVE, hatData[client].offset);
}
} else { } else {
SetParent(entity, client); SetParent(entity, client);
SetParentAttachment(modifyEntity, attachPoint, true); SetParentAttachment(modifyEntity, attachPoint, true);

View file

@ -15,6 +15,7 @@ static float EMPTY_ANG[3] = { 0.0, 0.0, 0.0 };
#include <gamemodes/ents> #include <gamemodes/ents>
#include <smlib/effects> #include <smlib/effects>
#include <multicolors> #include <multicolors>
#include <left4dhooks>
#include <adminmenu> #include <adminmenu>
@ -48,7 +49,6 @@ public Plugin myinfo = {
url = "https://github.com/Jackzmc/sourcemod-plugins" url = "https://github.com/Jackzmc/sourcemod-plugins"
}; };
ArrayList NavAreas;
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) { public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) {
return APLRes_Success; return APLRes_Success;
} }
@ -343,10 +343,10 @@ void Event_PlayerOutOfIdle(Event event, const char[] name, bool dontBroadcast) {
void Frame_FixClient(int client) { void Frame_FixClient(int client) {
if(IsClientConnected(client) && GetClientTeam(client) == 2) { if(IsClientConnected(client) && GetClientTeam(client) == 2) {
ClearParent(client); ClearParent(client);
SetEntProp(client, Prop_Send, "m_CollisionGroup", 5); SetEntProp(client, Prop_Send, "m_CollisionGroup", 5);
SetEntProp(client, Prop_Send, "m_nSolidType", 2); SetEntProp(client, Prop_Send, "m_nSolidType", 2);
SetEntityMoveType(client, MOVETYPE_WALK); SetEntityMoveType(client, MOVETYPE_WALK);
} }
// SetEntProp(client, Prop_Send, "movetype", MOVETYPE_ISOMETRIC); // SetEntProp(client, Prop_Send, "movetype", MOVETYPE_ISOMETRIC);
} }
@ -574,12 +574,21 @@ public void OnMapStart() {
tempGod[i] = false; tempGod[i] = false;
} }
GetCurrentMap(g_currentMap, sizeof(g_currentMap)); GetCurrentMap(g_currentMap, sizeof(g_currentMap));
NavAreas = GetSpawnLocations(); }
stock bool L4D_IsPlayerCapped(int client) {
if(GetEntPropEnt(client, Prop_Send, "m_pummelAttacker") > 0 ||
GetEntPropEnt(client, Prop_Send, "m_carryAttacker") > 0 ||
GetEntPropEnt(client, Prop_Send, "m_pounceAttacker") > 0 ||
GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker") > 0 ||
GetEntPropEnt(client, Prop_Send, "m_pounceAttacker") > 0 ||
GetEntPropEnt(client, Prop_Send, "m_tongueOwner") > 0)
return true;
return false;
} }
public void OnMapEnd() { public void OnMapEnd() {
delete NavAreas;
ClearHats(); ClearHats();
} }
public void OnPluginEnd() { public void OnPluginEnd() {