mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 02:33:21 +00:00
meh
This commit is contained in:
parent
445e0ea878
commit
d26ce4b924
3 changed files with 3 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,3 +10,5 @@ scripting/L4D2Testing.sp
|
||||||
plugins/L4D2Testing.smx
|
plugins/L4D2Testing.smx
|
||||||
scripting/cancer.sp
|
scripting/cancer.sp
|
||||||
plugins/sm_give.smx
|
plugins/sm_give.smx
|
||||||
|
plugins/l4d2_stats_recorder.smx
|
||||||
|
scripting/l4d2_stats_recorder.sp
|
Binary file not shown.
|
@ -112,8 +112,6 @@ public Action Event_BotPlayerSwap(Event event, const char[] name, bool dontBroad
|
||||||
//Player replaced a bot
|
//Player replaced a bot
|
||||||
int client = GetClientOfUserId(event.GetInt("player"));
|
int client = GetClientOfUserId(event.GetInt("player"));
|
||||||
if(botDropMeleeWeapon[bot] > 0) {
|
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");
|
int meleeOwnerEnt = GetEntPropEnt(botDropMeleeWeapon[bot], Prop_Send, "m_hOwnerEntity");
|
||||||
if(meleeOwnerEnt == -1) {
|
if(meleeOwnerEnt == -1) {
|
||||||
EquipPlayerWeapon(client, botDropMeleeWeapon[bot]);
|
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);
|
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) {
|
public void OnClientDisconnect(int client) {
|
||||||
if(botDropMeleeWeapon[client] > -1) {
|
if(botDropMeleeWeapon[client] > -1) {
|
||||||
float pos[3];
|
float pos[3];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue