Jump to content

Feature Request: Player Can Damage Other Player Traps

Pending 1.2.14

rfizzle
rfizzle

Posted

Current behavior:
When "Player Can Damage Other Player Buildings" is set to false, this also prevents players from damaging other players' deployed traps (AutoTurret, GunTrap, FlameTurret, BearTrap, LandMine). Both building blocks and deployable traps go through the same pCanDamOtherpBuildings rule in the BaseEntity handler.
 

Requested behavior:
Add a separate rule like "Player Can Damage Other Player Traps" that controls whether players can damage enemy trap/turret entities independently from building protection.
 

Use case:
On PvE servers with traps enabled (Disable Traps = false, Traps can damage Player = true), turrets and traps provide meaningful base defense. Players need to be able to destroy hostile turrets they encounter (e.g. when another player places a turret near them), but buildings should remain fully protected. Currently this is impossible without modifying the plugin source - enabling building damage to allow turret destruction also exposes all buildings to griefing.


Suggested implementation:
Add a type check for AutoTurret, GunTrap, FlameTurret, and BaseTrap before the generic BaseEntity handler in OnEntityTakeDamage, routing these entities to the new rule instead of pCanDamOtherpBuildings. This keeps the existing behavior as default while giving server owners granular control.

  • Like 1
2.3m

Downloads

Total number of downloads.

10.7k

Customers

Total customers served.

154.4k

Files Sold

Total number of files sold.

3.3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.