Author Topic: Physgunplayer still checking for old immunity  (Read 386 times)

0 Members and 1 Guest are viewing this topic.

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Physgunplayer still checking for old immunity
« on: January 25, 2010, 01:32:31 PM »
Hi, I have the latest Ulib and ULX SVNs, and I want to make it so admins can physgun each other and below, but not physgun superadmins.
I added "!%superadmin" after the "ulx physgunplayer" access for their group, in data/ULib/groups.txt. Yet admins can still physgun anyone including superadmins.
I checked the hook for this, at the end of "lua\ulx\modules\sh\util.lua", and I think it might still be checking for the old immunity.

Code: [Select]
--------------------
--     Hooks      --
--------------------
local function playerPickup( ply, ent )
if ent:GetClass() == "player" and ULib.isSandbox() and ULib.ucl.query( ply, "ulx physgunplayer" ) and not ent.NoNoclip and (not ULib.ucl.query( ent, ULib.ACCESS_IMMUNITY ) or ULib.ucl.query( ply, "overcomeimmunity" )) then
ent:SetMoveType( MOVETYPE_NONE ) -- So they don't bounce
return true
end
end
hook.Add( "PhysgunPickup", "ulxPlayerPickup", playerPickup, -5 ) -- Allow admins to move players. Call before the prop protection hook.
if SERVER then ULib.ucl.registerAccess( "ulx physgunplayer", ULib.ACCESS_ADMIN ) end

local function playerDrop( ply, ent )
if ent:GetClass() == "player" then
ent:SetMoveType( MOVETYPE_WALK )
end
end
hook.Add( "PhysgunDrop", "ulxPlayerDrop", playerDrop )

I've attached my groups.txt.
« Last Edit: January 25, 2010, 09:05:01 PM by RynO-SauruS »

Offline MrPresident

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 602
  • Karma: 49
  • G4P Community Leader
    • View Profile
    • MrPresidents Server Community - |G4P|
Re: Physgunplayer still checking for old immunity
« Reply #1 on: January 26, 2010, 05:07:21 AM »
You are correct in your assessment that this is still checking old immunities. Being that the SVN is still inherently a beta of ULX/ULib, it's expected and understood that not all features are complete and converted from the old system.

That being said, I'm sure Meg and the rest of the team will (if they already haven't) take note of this for their list of things to do.
Community is currently on hiatus... Will resume when I return from the great sandbox.

http://www.g4p.org

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Re: Physgunplayer still checking for old immunity
« Reply #2 on: January 26, 2010, 09:37:22 AM »
Hi, MrPresident, thanks for replying. I'd like for this to be fixed.. For me, this seems to be the only access I haven't been able to use the new command system on.
I think with a little research on how it works now, I might even be able to fix it myself. Megiddo, how long do you think this will take? Not to be impatient, I'm sure you and the team are busy..
Are there any quick workarounds I could use?
« Last Edit: January 26, 2010, 10:20:43 AM by RynO-SauruS »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • ****
  • Posts: 3488
  • Karma: 188
  • Project Lead
    • View Profile
Re: Physgunplayer still checking for old immunity
« Reply #3 on: January 26, 2010, 11:02:51 AM »
No quick workarounds, I was dumb in my implementation and didn't think outside the box of commands executed in console. It's something that I've got to re-architect a bit to support. It's all an issue of time right now. I've got lots of things I need to do for ULX backlogged, but I've got a senior project this semester that all my coding time is being spent on.
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” -Brian W. Kernighan
"I love working on my crappy code. it is crappy, but it is mine. I guess I could love other people's code, but it's like loving other people's children -- not quite the same as your own" -- Jeff Atwood
"Their tree came and found my tree!" -- Stickly Man!

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Re: Physgunplayer still checking for old immunity
« Reply #4 on: February 19, 2010, 02:16:13 PM »
It's been a few weeks now, and I've noticed you've made many changes to the ULX SVN/ULib SVN since then.
I also noticed JamminR released an 'old skewl immunity' addon, and he said it uses new ULib hooks.
This leads me to suspect that making physgunplayer work with the new command system might now be possible.
Is it? If not, then how's the progress? (if any)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • ****
  • Posts: 3262
  • Karma: 106
  • Project Specialist
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Physgunplayer still checking for old immunity
« Reply #5 on: February 19, 2010, 03:13:55 PM »
Until Megiddo comes up with a much nicer redesign, manually give your superadmins some special command access like "physgun_protected"
Then in the original code example you posted above, change ULib.ACCESS_IMMUNITY to "physgun_protected"
(Place quotes around what you add)

The only drawback to the hack is that each time you update SVN, you'll need to change it again until the redesign.

In theory I COULD use the access_immunity in my old skewl script...but I purposely avoided it knowing that one day we plan on simplifying the awesome but hard to easily adjust group control/immunity like commands.
Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it - David Pogue

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Re: Physgunplayer still checking for old immunity
« Reply #6 on: February 19, 2010, 07:41:27 PM »
Thanks JamminR, I might try that.
« Last Edit: February 19, 2010, 07:45:06 PM by RynO-SauruS »

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Re: Physgunplayer still checking for old immunity
« Reply #7 on: February 23, 2010, 08:32:36 PM »
I made a small addon as a temporary quick fix for this problem: AntiPhysgun
« Last Edit: February 23, 2010, 08:35:46 PM by RynO-SauruS »