Raised This Month: $51 Target: $400
 12% 

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 06-17-2011 , 09:07   Re: SDK Hooks 2.0
#1461

There are ways to disable the monitoring of moving entity on the server? or disable predict for specific entity?
Attached to the player weapons during the movement of the player does not lag, but attached to the player prop_dynamic much lag, is it possible to fix?
Nail is offline
Nail
BANNED
Join Date: May 2008
Location: PetrovЪ GradЪ
Old 06-17-2011 , 11:32   Re: SDK Hooks 2.0
#1462

How can I hook entity kill not to report the destruction of the players? So that the players believed that all the entity has not yet destroyed
Nail is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-17-2011 , 13:39   Re: SDK Hooks 2.0
#1463

As first mentioned here,
https://forums.alliedmods.net/showth...38#post1490138

A bug has been discovered where some of the hook callbacks that are in the form of (ent, otherEnt) can get bad data in otherEnt if otherEnt would otherwise be -1. The value could have been something wildly out of the valid edict or entity ranges.

The most common occurrence of this seems to be with the WeaponDrop hook. When the game calls this, the weapon can be NULL (for example, if the player isn't currently holding a weapon).

There was also similar that could happen with TraceAttack or OnTakeDamage, where an ent would have a value of 4095 instead of -1.

There are fixed builds available now that resolve the above, but I'm not quite ready to do another release yet. Some other refactoring was done that isn't completely tested yet (though I don't expect issues), and there are a couple more hooktypes for possible addition that I still want to evaluate.

I recommend running if you know that you are having trouble related to one of the aforementioned issues.

hg119 and newer have the fixes. Windows builds are not yet available but hopefully will be soon.
http://users.alliedmods.net/~psychonic/builds/sdkhooks/2.0/

As before, source is available at http://hg.nicholashastings.com/sdkhooks
The 'hg' numbers in the filenames will match the revision number in the hosted copy of the repository.

Last edited by psychonic; 06-20-2011 at 08:50.
psychonic is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 06-17-2011 , 13:48   Re: SDK Hooks 2.0
#1464

I remember running into some strange problems when modifying weapons during these hooks, but I never looked into it. I think it's still shooting out errors and I just left it anyway.

I'll play around with this update and see how it goes, thanks!
GoD-Tony is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 06-19-2011 , 13:19   Re: SDK Hooks 2.0
#1465

Quote:
Originally Posted by klausenbusk View Post
Is it possible to make ShouldCollide to something like:
PHP Code:
bool:public(entityCollidewith,collisiongroupcontentsmaskbool:originalResult), 
So i can see what who my entity are Collide with?
@psychonic

Could you answer me? Are it possible? if yes. Could/will you implement it?
klausenbusk is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-19-2011 , 16:12   Re: SDK Hooks 2.0
#1466

Quote:
Originally Posted by klausenbusk View Post
@psychonic

Could you answer me? Are it possible? if yes. Could/will you implement it?
No. That's not how ShouldCollide works.

All of the information available is already passed. It is a check to see if, based on a given collision group and mask, whether or not the there should or would be a collision. Their isn't necessary another entity potentially being collided with, and when their is, ShouldCollide does not know nor care. It is just a basic check using the aforementioned info.
psychonic is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 06-19-2011 , 17:10   Re: SDK Hooks 2.0
#1467

Quote:
Originally Posted by psychonic View Post
No. That's not how ShouldCollide works.

All of the information available is already passed. It is a check to see if, based on a given collision group and mask, whether or not the there should or would be a collision. Their isn't necessary another entity potentially being collided with, and when their is, ShouldCollide does not know nor care. It is just a basic check using the aforementioned info.
@psychonic
I say THANK

But how will you so make this?

Spawn "prop_dynamic_override" prop, and allow a single player to go through this prop? (all other should collide with it)

PHP Code:
decl Ent;
Ent CreateEntityByName("prop_dynamic_override");
DispatchKeyValue(Ent"solid""6");
TeleportEntity(EntendNULL_VECTORNULL_VECTOR); 
(code to spawn prop..)
klausenbusk is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-19-2011 , 17:17   Re: SDK Hooks 2.0
#1468

Quote:
Originally Posted by klausenbusk View Post
@psychonic
I say THANK

But how will you so make this?

Spawn "prop_dynamic_override" prop, and allow a single player to go through this prop? (all other should collide with it)

PHP Code:
decl Ent;
Ent CreateEntityByName("prop_dynamic_override");
DispatchKeyValue(Ent"solid""6");
TeleportEntity(EntendNULL_VECTORNULL_VECTOR); 
(code to spawn prop..)
Creative use of (Start)Touch hooking and changing player or entity collision group.
psychonic is offline
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 06-20-2011 , 08:38   Re: SDK Hooks 2.0
#1469

Quote:
Originally Posted by klausenbusk View Post
Spawn "prop_dynamic_override" prop, and allow a single player to go through this prop? (all other should collide with it)
If you don't need to change which player can walk through the prop after it is created, you can just set the player as the owner of the prop. The owner of a prop cannot collide with it.
Pawn 3-pg is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 06-20-2011 , 09:55   Re: SDK Hooks 2.0
#1470

Quote:
Originally Posted by Pawn 3-pg View Post
If you don't need to change which player can walk through the prop after it is created, you can just set the player as the owner of the prop. The owner of a prop cannot collide with it.
Can i set more than 1 owner on a prop? (then it would be perfect)
klausenbusk is offline
Closed Thread



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 07:56.


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