AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.6 | 17-September-2021] (https://forums.alliedmods.net/showthread.php?t=328327)

Marttt 11-04-2020 17:25

[L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.6 | 17-September-2021]
 
10 Attachment(s)
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:

// Enable/Disable 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 models.
  • 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.

moekai 11-15-2020 17:11

Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.0 | 04-November-2020]
 
This plugin prevented me from pick up gascans and propane tanks that spawn in the map

moekai 11-17-2020 11:24

Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.1 | 15-November-2020]
 
It works now. Thanks for the update

Dragokas 12-03-2020 14:58

Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.2 | 29-November-2020]
 
Nice !

Quote:

Originally Posted by Marttt (Post 2723746)
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.

maclarens 12-06-2020 01:21

Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.2 | 29-November-2020]
 
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.

Dragokas 12-24-2020 15:11

Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.2 | 29-November-2020]
 
Hi, Marttt.

Plugin contains an incorrect check for the allowed game engine for L4D1.
Prevents plugin from loading.

Marttt 09-17-2021 01:45

Re: [L4D1 & L4D2] Remove Weapons/Carryables Collision [v1.0.6 | 17-September-2021]
 
Plugin updated (1.0.6)

Code:

1.0.6 (17-September-2021)
    - Added support to gnome and cola (L4D2 only)
    - Fixed a L4D2 only bug where gascans explode on melee hit. (thanks "Forgetest" for reporting)



All times are GMT -4. The time now is 23:42.

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