This commit is contained in:
Jackzie 2021-01-04 18:01:06 -06:00
parent 445e0ea878
commit d26ce4b924
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
3 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View file

@ -10,3 +10,5 @@ scripting/L4D2Testing.sp
plugins/L4D2Testing.smx
scripting/cancer.sp
plugins/sm_give.smx
plugins/l4d2_stats_recorder.smx
scripting/l4d2_stats_recorder.sp

Binary file not shown.

View file

@ -112,8 +112,6 @@ public Action Event_BotPlayerSwap(Event event, const char[] name, bool dontBroad
//Player replaced a bot
int client = GetClientOfUserId(event.GetInt("player"));
if(botDropMeleeWeapon[bot] > 0) {
//TODO: If entity (weapon) not valid (aka level switched), give them a new one no matter what
//Also possibly prevent players from picking up any dropped weapons (no duplicates then ^)
int meleeOwnerEnt = GetEntPropEnt(botDropMeleeWeapon[bot], Prop_Send, "m_hOwnerEntity");
if(meleeOwnerEnt == -1) {
EquipPlayerWeapon(client, botDropMeleeWeapon[bot]);
@ -125,7 +123,7 @@ public Action Event_BotPlayerSwap(Event event, const char[] name, bool dontBroad
SDKUnhook(bot, SDKHook_WeaponDrop, Event_OnWeaponDrop);
}
}
//TODO: Might have to actually check for the bot they control, or possibly the bot will call this itself.
public void OnClientDisconnect(int client) {
if(botDropMeleeWeapon[client] > -1) {
float pos[3];