Raised This Month: $32 Target: $400
 8% 

[L4D & 2] Pick Up / No Auto Switch (4.3 - Jan 4th 2023)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Forgetest
Member
Join Date: Aug 2020
Plugin ID:
8202
Plugin Version:
4.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
5 
Plugin Description:
Alters a few things regarding picking up/giving items and incapped Players.
Old 09-29-2022 , 04:13   [L4D & 2] Pick Up / No Auto Switch (4.3 - Jan 4th 2023)
Reply With Quote #1

Description:
Developed after SirPlease's initial work. Big thanks to him.

This plugin allows players to customize their auto switch setting that was forced by game,
which means players can decide to not pull out weapons when picking up.

Besides it provides control over behaviors regarding:
  • Receiving light health items (stop the game forcing players to pull out)
  • Picking up incapped teammates (interrupt the pick-up under certain situations)

Known Issues:
Anyway the features are accomplished server-side, so inevitably there is an unsync issue across network between client and server.

This is unlike other games, e.g., CS:GO where the auto switching is built in so the client can predict it to happen depending on client settings regardless of response from server side.
Eventually it boils down to some failing in manual switching at the very timing when the auto switch should happen, and it could be annoying with high latency.

CVars:
PHP Code:
// "Flags for Switching from current item (1:Secondary, 2: Passed Pills, 4: Primary)"
// The default flags applied on clients
// ("Secondary" and "Primary" flag applies only when the client has never used the command to customize)
pickup_switch_flags "7" 

// "Flags for Stopping Pick-up progress on Incapped Survivors (1:Spit Damage, 2:TankPunch, 4:TankRock"
pickup_incap_flags "7" 

Player Commands:
PHP Code:
// Toggle the auto switch setting for primaries
// The setting is saved server-side and restored every time joining the server.
!primary sm_primary

// Toggle the auto switch setting for secondaries
// The setting is saved server-side and restored every time joining the server.
!secondary sm_secondary 

Dependency:

Installation:
  • Get l4d2_pickup.smx into plugins folder.
  • Get l4d2_pickup.txt into gamedata folder.
  • Get l4d2_pickup.phrases.txt into translations folder.
    • As an English translation file, it can be distributed into other language versions.


Extra Compiling Requirement:

Changelog:
Code:
4.3 (Jan 4th, 2023)
Fix: - Fixed an error in `DTR_OnSetViewModel` where weapon owner is invalid. - Fixed an error in `Event_PlayerHurt` where `L4D_StopReviveAction` processes indices of dying players. Feature: - New console command `sm_primary` for users to change the preference on switching to primary when pick-up. Changed: Source & Translations
4.2.1 (Sep 29th, 2022)
- Initial release on forum.

GitHub Repository

DO NOT CLICK "Get Plugin" BELOW
Attached Files
File Type: txt l4d2_pickup.txt (5.7 KB, 230 views)
File Type: txt l4d2_pickup.phrases.txt (598 Bytes, 176 views)
File Type: sp Get Plugin or Get Source (l4d2_pickup.sp - 130 views - 20.7 KB)
File Type: smx l4d2_pickup.smx (17.9 KB, 240 views)

Last edited by Forgetest; 01-24-2023 at 06:05.
Forgetest is offline
Mika Misori
Senior Member
Join Date: Sep 2022
Old 01-03-2023 , 20:55   Re: [L4D & 2] Pick Up / No Auto Switch
Reply With Quote #2

Thanks for the plugin, work like a charm for months, but today I saw errors in the logs:

Code:
L 01/02/2023 - 04:32:45: SourceMod error session started
L 01/02/2023 - 04:32:45: Info (map "xmas_atrium") (file "/game/left4dead2/addons/sourcemod/logs/errors_20230102.log")
L 01/02/2023 - 04:32:45: [SM] Exception reported: Entity 3 (3) is invalid
L 01/02/2023 - 04:32:45: [SM] Blaming: l4d2_pickup.smx
L 01/02/2023 - 04:32:45: [SM] Call stack trace:
L 01/02/2023 - 04:32:45: [SM]   [0] GetEntPropEnt
L 01/02/2023 - 04:32:45: [SM]   [1] Line 550, J:\Documents\GitHub\MoYu_Server_Stupid_Plugins\The Last Stand\l4d2_pickup\l4d2_pickup.sp::DTR_OnSetViewModel
L 01/02/2023 - 04:32:45: [SM] Exception reported: Entity 3 (3) is invalid
L 01/02/2023 - 04:32:45: [SM] Blaming: l4d2_pickup.smx
L 01/02/2023 - 04:32:45: [SM] Call stack trace:
L 01/02/2023 - 04:32:45: [SM]   [0] GetEntPropEnt
L 01/02/2023 - 04:32:45: [SM]   [1] Line 550, J:\Documents\GitHub\MoYu_Server_Stupid_Plugins\The Last Stand\l4d2_pickup\l4d2_pickup.sp::DTR_OnSetViewModel
L 01/02/2023 - 04:32:49: Error log file session closed.
Full log in attachment.
Attached Files
File Type: log errors_20230102.log (3.6 KB, 107 views)

Last edited by Mika Misori; 01-03-2023 at 20:56. Reason: Added code tags
Mika Misori is offline
Forgetest
Member
Join Date: Aug 2020
Old 01-04-2023 , 04:35   Re: [L4D & 2] Pick Up / No Auto Switch
Reply With Quote #3

Quote:
Originally Posted by Mika Misori View Post
Thanks for the plugin, work like a charm for months, but today I saw errors in the logs:

Code:
L 01/02/2023 - 04:32:45: SourceMod error session started
L 01/02/2023 - 04:32:45: Info (map "xmas_atrium") (file "/game/left4dead2/addons/sourcemod/logs/errors_20230102.log")
L 01/02/2023 - 04:32:45: [SM] Exception reported: Entity 3 (3) is invalid
L 01/02/2023 - 04:32:45: [SM] Blaming: l4d2_pickup.smx
L 01/02/2023 - 04:32:45: [SM] Call stack trace:
L 01/02/2023 - 04:32:45: [SM]   [0] GetEntPropEnt
L 01/02/2023 - 04:32:45: [SM]   [1] Line 550, J:\Documents\GitHub\MoYu_Server_Stupid_Plugins\The Last Stand\l4d2_pickup\l4d2_pickup.sp::DTR_OnSetViewModel
L 01/02/2023 - 04:32:45: [SM] Exception reported: Entity 3 (3) is invalid
L 01/02/2023 - 04:32:45: [SM] Blaming: l4d2_pickup.smx
L 01/02/2023 - 04:32:45: [SM] Call stack trace:
L 01/02/2023 - 04:32:45: [SM]   [0] GetEntPropEnt
L 01/02/2023 - 04:32:45: [SM]   [1] Line 550, J:\Documents\GitHub\MoYu_Server_Stupid_Plugins\The Last Stand\l4d2_pickup\l4d2_pickup.sp::DTR_OnSetViewModel
L 01/02/2023 - 04:32:49: Error log file session closed.
Full log in attachment.
Thanks for reporting, updated and should be fixed.
Forgetest is offline
Mika Misori
Senior Member
Join Date: Sep 2022
Old 01-06-2023 , 06:48   Re: [L4D & 2] Pick Up / No Auto Switch
Reply With Quote #4

Quote:
Originally Posted by Forgetest View Post
Thanks for reporting, updated and should be fixed.
Thank you. Put it on the server, I'll report in a couple of weeks about the result.
Mika Misori is offline
Mika Misori
Senior Member
Join Date: Sep 2022
Old 01-23-2023 , 05:42   Re: [L4D & 2] Pick Up / No Auto Switch
Reply With Quote #5

Quote:
Originally Posted by Forgetest View Post
Thanks for reporting, updated and should be fixed.
Well, server started crashing after I installed this version of the plugin.
And before that, it worked stably for months without a single crash.

Over the past few days, there have been 3 crashes on different maps, with different errors. Full logs in attachment.

Accelerator crash links:
https://crash.limetech.org/uhrngfenxj4o
https://crash.limetech.org/oy4zdx4lt6ug
https://crash.limetech.org/epfd6x56g37r

I would be glad if someone could help with this.
Attached Files
File Type: log crash-2023-01-17_21-47-45.log (39.0 KB, 75 views)
File Type: log crash-2023-01-18_17-03-17.log (34.5 KB, 79 views)
File Type: log crash-2023-01-22_21-10-59.log (35.9 KB, 74 views)
File Type: log errors_20230117.log (324 Bytes, 72 views)
File Type: log errors_20230118.log (324 Bytes, 62 views)
File Type: log errors_20230122.log (1.3 KB, 69 views)
File Type: log accelerator.log (729 Bytes, 121 views)
Mika Misori is offline
Mika Misori
Senior Member
Join Date: Sep 2022
Old 01-31-2023 , 05:36   Re: [L4D & 2] Pick Up / No Auto Switch
Reply With Quote #6

Quote:
Originally Posted by Forgetest View Post
Thanks for reporting, updated and should be fixed.
3 more crashes lately. Rolling back to the old version of the plugin.

Accelerator crash links:
https://crash.limetech.org/l365jsgdvi7h
https://crash.limetech.org/fvihdvgopxww
https://crash.limetech.org/bbq5dydcypl4
Attached Files
File Type: log errors_20230123.log (324 Bytes, 95 views)
File Type: log errors_20230125.log (324 Bytes, 100 views)
File Type: log errors_20230129.log (324 Bytes, 84 views)
File Type: log crash-2023-01-23_15-09-09.log (36.8 KB, 79 views)
File Type: log crash-2023-01-25_16-10-51.log (39.7 KB, 94 views)
File Type: log crash-2023-01-29_21-23-52.log (47.7 KB, 62 views)
Mika Misori is offline
Forgetest
Member
Join Date: Aug 2020
Old 02-03-2023 , 07:57   Re: [L4D & 2] Pick Up / No Auto Switch
Reply With Quote #7

Quote:
Originally Posted by Mika Misori View Post
3 more crashes lately. Rolling back to the old version of the plugin.

Accelerator crash links:
https://crash.limetech.org/l365jsgdvi7h
https://crash.limetech.org/fvihdvgopxww
https://crash.limetech.org/bbq5dydcypl4
I cannot really figure out what exactly causes this, and if you were using the last version it shouldn't crash since there's no breaking change in the previous update.

Appreciate the reports and it would be good if you could also provide more info e.g. when the crash happens.
Forgetest is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode