Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: RynO-SauruS on January 25, 2010, 01:32:31 PM

Title: Physgunplayer still checking for old immunity
Post by: RynO-SauruS 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.
Title: Re: Physgunplayer still checking for old immunity
Post by: MrPresident 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.
Title: Re: Physgunplayer still checking for old immunity
Post by: RynO-SauruS 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?
Title: Re: Physgunplayer still checking for old immunity
Post by: Megiddo 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.
Title: Re: Physgunplayer still checking for old immunity
Post by: RynO-SauruS 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 (http://forums.ulyssesmod.net/index.php/topic,4507.0.html), 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)
Title: Re: Physgunplayer still checking for old immunity
Post by: JamminR 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.
Title: Re: Physgunplayer still checking for old immunity
Post by: RynO-SauruS on February 19, 2010, 07:41:27 PM
Thanks JamminR, I might try that.
Title: Re: Physgunplayer still checking for old immunity
Post by: RynO-SauruS on February 23, 2010, 08:32:36 PM
I made a small addon as a temporary quick fix for this problem: AntiPhysgun (http://forums.ulyssesmod.net/index.php/topic,4549.0.html)