Raised This Month: $ Target: $400
 0% 

Grabber:SM


Post New Thread Reply   
 
Thread Tools Display Modes
Dragonshadow
BANNED
Join Date: Jun 2008
Old 06-20-2009 , 16:38   Re: Grabber:SM
Reply With Quote #101

Quote:
Originally Posted by retsam View Post
Hum I think the bug with the jumping and releasing even when thrown is disabled could be fixed if you had it apply the dropgravity cvar value. If you can set the gravity on the thing when droponjump is enabled, I think it would fix that bug.
See if this works, though I'm 90% sure I screwed something up (I am still learning after all).
Attached Files
File Type: sp Get Plugin or Get Source (ztf2grabfix.sp - 368 views - 44.9 KB)
Dragonshadow is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-21-2009 , 13:13   Re: Grabber:SM
Reply With Quote #102

Its kewl, that was directed towards naris anyways. Id let him do it.
retsam is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 06-21-2009 , 16:40   Re: Grabber:SM
Reply With Quote #103

You could always test it... ._.
Dragonshadow is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-22-2009 , 15:58   Re: Grabber:SM
Reply With Quote #104

Anyways...Ya it does look like that fix works. Maybe naris can look it over just to make sure its done properly.
retsam is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 06-22-2009 , 17:13   Re: Grabber:SM
Reply With Quote #105

Quote:
Originally Posted by retsam View Post
Anyways...Ya it does look like that fix works. Maybe naris can look it over just to make sure its done properly.
All I did was copy the code from the ungrab function that sets the gravity and whatnot of the building and put it in the updateobjects function where it says

PHP Code:
if (!(permissions CAN_JUMP_WHILE_HOLDING) &&
       (
GetClientButtons(i) & IN_JUMP)) 
so that it applies the same gravity/movetype as it normally would.
Dragonshadow is offline
h00x
Senior Member
Join Date: Jun 2009
Old 06-24-2009 , 06:31   Re: Grabber:SM
Reply With Quote #106

Naris, whats the cvar on your version to only allow the owner to pick up his objects (to prevent theft)and also whats the cvar to dissallow picking up of the despencer (since it only works where it was built)?
h00x is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 06-24-2009 , 07:25   Re: Grabber:SM
Reply With Quote #107

sm_grab_teamgrab 0
makes it so you can't pick up teammembers buildings.

sm_grab_theif 0
makes it so you can't steal a building out of another player's hands (if sm_grab_teamgrab is set to 1, otherwise you can't grab it regardless)

There currently is no cvar in naris' version to disallow moving dispensers.
Dragonshadow is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-24-2009 , 16:58   Re: Grabber:SM
Reply With Quote #108

My own version has the cvar for dispensers since they dont work. I have them disabled.

All you gotta do is add. (NOTE: Im still using the older version) I probably didnt do it the best way but, it works.

Code:
new Handle:cvDispenserEnabledg = INVALID_HANDLE;
Add this under pluginstart obviously...
Code:
    cvDispenserEnabledg = CreateConVar("sm_grabber_dispenserenabled", "1", "Can engie dispeners be grabbed? (0=no 1=yes)");
under command_grab search for //Check for known TF2 object part.

Code:
// Check for known TF2 objects
    if (grab >= dispenser && grab <= sentrygun)              
    {
                
        builder = GetEntPropEnt(ent, Prop_Send, "m_hBuilder");

        new permissions = gPermissions[client];
        if (!(permissions & CAN_GRAB_BUILDINGS))
        {
            if (!groundmode)
                EmitSoundToAll(gInvalidSound, client);

            return Plugin_Handled;
        }
        if (grab == dispenser)
        {
          builder = GetEntPropEnt(ent, Prop_Send, "m_hBuilder");
          if(!GetConVarBool(cvDispenserEnabledg))
          {
            if (!groundmode)
                EmitSoundToAll(gInvalidSound, client);
    
            return Plugin_Handled;
          }
        }

Maybe you guys might consider implementing a dispenser cvar into it since they clearly do not work after they are grabbed. It looks like others might find the cvar useful.

Last edited by retsam; 06-24-2009 at 17:04.
retsam is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 06-24-2009 , 18:22   Re: Grabber:SM
Reply With Quote #109

If I knew how to do it, I would make the plugin parent the healing entity with the dispenser entity so you could move them correctly.
Dragonshadow is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 06-30-2009 , 19:01   Re: Grabber:SM
Reply With Quote #110

Quote:
Originally Posted by retsam View Post
2) Moving with a building, if you jump and it drops it, sometimes it floats along the ground. I had thought that was one issue that was fixed? Sometimes they slide along the ground for like 5-10 seconds before it stops.
This is probably due to the changes I made to prevent buildings from getting "stuck" on the side of a hill, building or something. Now they should eventually slide down the hill to the bottom. However, they should be enabled while this is happening and not be disabled.
naris is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode