SetParentAttachment causing issues
I am parenting a prop_dynamic_override to a player which works fine, but when I use SetParentAttachment, it causes some weird issues in CSS such as crouching and jumping make the player shaky. Has anyone else experienced this and found a solution?
Those issues are not present when SetParentAttachment is not used. |
Re: SetParentAttachment causing issues
It sounds like the models are colliding with each other. I know prop hunt has a similar issue when crouching or in a corner, you could try changing the collisions
|
Re: SetParentAttachment causing issues
I was having a problem initially with the player not being able to move. Once I disabled collisions through AcceptEntityInput(ent, "DisableCollision"); it worked fine and they could move, so I wouldn't think it would be a collision problem. At the same time I guess it could really be anything. Hoping someone else has had this problem before as im too sleepy to start turning off props one by one.
|
Re: SetParentAttachment causing issues
toazron1 is right the models are colliding with each other, i had the same problems years ago when i was coding a ctf mod in es, i changed the collision group of the flag when it was parented and put it back to default when it was dropped or at base.
|
Re: SetParentAttachment causing issues
Hook the CBaseEntity::ShouldCollide function and deal with it there (assuming you're not going for just a plugin-only thing).
|
Re: SetParentAttachment causing issues
Quote:
Im using SDKHooks to make my life easier, but I guess I could hack it up and throw in a hook. |
Re: SetParentAttachment causing issues
Thanks for the help, I decided to print out all of the netprops as it had to be one of them. It was the m_nSolidType causing the issues. So for anyone experiencing this issue...
AcceptEntityInput(ent, "DisableCollision"); in conjunction with... SetEntProp(ent, Prop_Send, "m_nSolidType", 0); is what is required to prevent that shaky crap. |
Re: SetParentAttachment causing issues
Quote:
Gonna probably just give in after class and add ShouldCollide to SDKHooks. |
Re: SetParentAttachment causing issues
if you don't mind me asking are you trying to code a ctf mod? i remember in a another thread you mentioning flag models. if so you can use env_beam as a tripwire (found out by mattie of es) instead of trying to use ontouch. also for my own ctf mod i used a physics prop instead of dynamic so when a player died the flag would fall to the ground.
|
Re: SetParentAttachment causing issues
Yeah I am, its a job I am doing for someone. I wish I could use a physics prop, but it won't work since this model has no collision mesh. (Its the same one from the ES version) The tripwire isn't a bad idea, but I think it would be easier to just make a ShouldCollide hook, after all maybe someone else will need it in the future.
This is the last time I ever do a game mode mod in sourcepawn, I absolutely hate trying to manage one without OOP, gets me flustered and annoyed lol. |
All times are GMT -4. The time now is 02:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.