Raised This Month: $41 Target: $400
 10% 

[L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.5 | 11-April-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7365
Plugin Version:
1.0.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Changes the collision from all weapons or carryables to collide only with the world and static stuff
    Old 11-04-2020 , 17:25   [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.5 | 11-April-2021]
    Reply With Quote #1

    Description

    This plugin changes the collision from all weapons or carryables to collide only with the world and static stuff.

    Useful on servers where is possible to have many items in almost the same place (e.g. through !buy system), which can cause lag because of the number of items colliding.

    Features
    • Changes the collision for all weapons or carryables to collide only with the world and static stuff.
    • Allows disabling motion for all weapons or carryables on hit/shove.

    Cvars

    A configuration file named "l4d_remove_item_collision.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Enables/Disables the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_remove_item_collision_enable "1"

    // Allow motion when the item is hit.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_remove_item_collision_motion "0"

    // Allow motion when the item is shoved.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_remove_item_collision_shove_motion "1" 
    Admin Commands
    • sm_print_cvars_l4d_remove_item_collision => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • This plugin precache some entities.
    • Collision Group (m_CollisionGroup) was changed to 2 (COLLISION_GROUP_DEBRIS_TRIGGER).
    • BUG: Using m_CollisionGroup = 1 (COLLISION_GROUP_DEBRIS), prevents prop_physics entities from being picked up, but weapon_* entities seems to work normal with m_CollisionGroup = 1.
    • Because of the new collision group, some items can be in the same place, looking as if it was just one.

    To Do
    • Create specific config for each entity class.

    Recommended Plugins
    Related Plugins

    Thank you!

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d_remove_item_collision.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_remove_item_collision.sp - 12 views - 14.1 KB)
    __________________

    Last edited by Marttt; 04-11-2021 at 08:32.
    Marttt is offline
    moekai
    Member
    Join Date: Jul 2019
    Old 11-15-2020 , 17:11   Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.0 | 04-November-2020]
    Reply With Quote #2

    This plugin prevented me from pick up gascans and propane tanks that spawn in the map

    Last edited by moekai; 11-15-2020 at 17:11.
    moekai is offline
    moekai
    Member
    Join Date: Jul 2019
    Old 11-17-2020 , 11:24   Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.1 | 15-November-2020]
    Reply With Quote #3

    It works now. Thanks for the update
    moekai is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine
    Old 12-03-2020 , 14:58   Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.2 | 29-November-2020]
    Reply With Quote #4

    Nice !

    Quote:
    Originally Posted by Marttt View Post
    Description
    Useful on servers where is possible to have many items in almost the same place (e.g. through !buy system), which can cause lag because of the number of items colliding.
    Not only. I saw a crash due to this type of collision caused due to some people by intention abusing grab/drop the weapon feature from the Silver's Guns Cabinet.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch) (my New server L4D2)
    [My plugins] [My tools] [GitHub] [Articles] [Donate]

    Last edited by Dragokas; 12-03-2020 at 14:58.
    Dragokas is offline
    maclarens
    Member
    Join Date: Jul 2020
    Old 12-06-2020 , 01:21   Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.2 | 29-November-2020]
    Reply With Quote #5

    L 12/06/2020 - 02:52:11: SourceMod error session started
    L 12/06/2020 - 02:52:11: Info (map "c4m1_milltown_a") (file "/home/admin/left4dead2/serverfiles/left4dead2/addons/sourcemod/logs/errors_20201206.log")
    L 12/06/2020 - 02:52:11: [SM] Exception reported: Entity 33 is not valid
    L 12/06/2020 - 02:52:11: [SM] Blaming: l4d_remove_item_collision.smx
    L 12/06/2020 - 02:52:11: [SM] Call stack trace:
    L 12/06/2020 - 02:52:11: [SM] [0] FindEntityByClassname
    L 12/06/2020 - 02:52:11: [SM] [1] Line 175, l4d_remove_item_collision.sp::LateLoad
    L 12/06/2020 - 02:52:11: [SM] [2] Line 148, l4d_remove_item_collision.sp::OnConfigsExecut ed
    L 12/06/2020 - 02:52:11: Error log file session closed.
    maclarens is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine
    Old 12-24-2020 , 15:11   Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.2 | 29-November-2020]
    Reply With Quote #6

    Hi, Marttt.

    Plugin contains an incorrect check for the allowed game engine for L4D1.
    Prevents plugin from loading.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch) (my New server L4D2)
    [My plugins] [My tools] [GitHub] [Articles] [Donate]
    Dragokas is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 12-31-2020 , 15:13   Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.4 | 24-December-2020]
    Reply With Quote #7

    Updated.

    Code:
    1.0.4 (31-December-2020)
        - Added cvar to control motion OnTakeDamage [damageForce]. (thanks "Tonblader" for requesting)
    __________________
    Marttt 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 04:49.


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