mirror of
https://github.com/CheezusChrust/Physgun-Buildmode.git
synced 2025-03-04 03:13:00 -05:00
Proper CPPI check
This commit is contained in:
parent
d3945eedd4
commit
b7da9f8c2d
@ -4,9 +4,8 @@ util.AddNetworkString("Server_Has_PhysBuildMode")
|
||||
AddCSLuaFile("autorun/client/cl_physgun_buildmode.lua")
|
||||
local pb_ = "physgun_buildmode_"
|
||||
local buildmode_ents = {}
|
||||
local CPPIEnabled = FindMetaTable("Entity").CPPIGetOwner and true or false
|
||||
|
||||
if not CPPIEnabled then
|
||||
if not CPPI then
|
||||
print("[Physgun Build Mode] WARNING: No CPPI-Compatible prop protection found!")
|
||||
end
|
||||
|
||||
@ -195,7 +194,7 @@ end)
|
||||
local Phys_Grab = function() end
|
||||
|
||||
local function isPropMine(ply, ent)
|
||||
if not CPPIEnabled then return true end
|
||||
if not CPPI then return true end
|
||||
|
||||
return ent:CPPIGetOwner() == ply
|
||||
end
|
||||
@ -299,4 +298,4 @@ hook.Add("PhysgunPickup", "Physgun Build Mode:Pickup", function(ply, ent)
|
||||
end
|
||||
end)
|
||||
|
||||
print("[Physgun Build Mode] Finished loading")
|
||||
print("[Physgun Build Mode] Finished loading")
|
||||
|
Loading…
Reference in New Issue
Block a user