nosoop / SM-TFCustomAttributeStarterPack

A collection of plugins to be used with the TF2 Custom Attribute framework.
MIT License
19 stars 10 forks source link

attr_buff_override causes lag on Sniper rage when player is joining #27

Closed BaconPlague closed 4 years ago

BaconPlague commented 4 years ago

I have applied this custom attribute on the sydney sleeper on my server and it seems to lag the server when I activate the sniper rage only as somebody is joining the server.

The code for the weapon attribute: "230" { "sniper weapon rate mod on hit ally" "scale=0.25 duration=8" "sniper weapon rate mod on hit" "scale=1.75 duration=8" "mod crit type on hitgroup" "hitgroup=1 crit_type=2" "custom buff type" "sniper rifle full auto" "generate rage over time" "30.0" "sniper rifle full auto rate" "0.25" }

And the error in the console: L 06/16/2020 - 17:13:01: [SM] Exception reported: Client 10 is not in game L 06/16/2020 - 17:13:01: [SM] Blaming: working_customattributes\attr_buff_override.smx L 06/16/2020 - 17:13:01: [SM] Call stack trace: L 06/16/2020 - 17:13:01: [SM] [0] IsPlayerAlive L 06/16/2020 - 17:13:01: [SM] [1] Line 129, scripting\attr_buff_override.sp::OnPulseRageBuffPre

nosoop commented 4 years ago

Ah, made a mistake in the client check — should be IsClientInGame instead of IsClientConnected. Will push out a fix in a minute.

I don't know how the buff override interacts with the Sleeper specifically, so let me know if there are any other issues.