Skip to content

Commit

Permalink
configurable prop pickup
Browse files Browse the repository at this point in the history
  • Loading branch information
Newbrict committed Jun 21, 2016
1 parent 2ef7752 commit 8e7e968
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gamemode/init.lua
Expand Up @@ -59,6 +59,7 @@ net.Receive("Class Selection", function( len, ply )
PrintMessage( HUD_PRINTTALK, ply:Nick().." moved from "..TeamString(oldTeam) .. " to ".. TeamString(ply:Team()))
RemovePlayerProp( ply )
ply:KillSilent()
--ply:Spawn()
end )

-- [[ Taunts ]] --
Expand Down Expand Up @@ -457,6 +458,6 @@ function GM:PlayerCanPickupWeapon(ply, wep)
end

function GM:AllowPlayerPickup(ply, ent)
if( ply:Team() != TEAM_HUNTERS ) then return false end
return true
return (OBJHUNT_TEAM_HUNTERS_CAN_MOVE_PROPS and ply:Team() == TEAM_HUNTERS) or
(OBJHUNT_TEAM_PROPS_CAN_MOVE_PROPS and ply:Team() == TEAM_PROPS)
end
6 changes: 6 additions & 0 deletions gamemode/shared/sh_config.lua
Expand Up @@ -66,6 +66,12 @@ PROP_DEFAULT_DENSITY = 0.0025879917184265
-- the maximum distance from the player the camera will render when in third person
THIRDPERSON_DISTANCE = 100

-- this enables TEAM_HUNTERS to pick up props
OBJHUNT_TEAM_HUNTERS_CAN_MOVE_PROPS = true

-- this enables TEAM_PROPS to pick up props
OBJHUNT_TEAM_PROPS_CAN_MOVE_PROPS = true

-- entities that are capable of being chosen by props
USABLE_PROP_ENTITIES = {
"prop_physics",
Expand Down

0 comments on commit 8e7e968

Please sign in to comment.