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

Solved Collision with entity owner


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 01-10-2017 , 08:46   Collision with entity owner
Reply With Quote #1

How i can enable collision for entity owner?

This is part from my code (works fine, but without collision for owner)
Code:
kvProps.GetString("model", model, sizeof(model));
int iEntity = CreateEntityByName("prop_dynamic");
PrecacheModel(model);
DispatchKeyValue(iEntity, "model", model);
DispatchKeyValue(iEntity, "solid", "6");
DispatchSpawn(iEntity);
SetEntPropEnt(iEntity, Prop_Send, "m_hOwnerEntity", iClient);
P.S. I'm using entity owner for menu item "Delete All Created Props".
I know that my problem can be fixed with this (C++), but how i can do this with SourcePawn?
__________________

Last edited by MAGNAT2645; 03-27-2017 at 01:32.
MAGNAT2645 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-10-2017 , 10:18   Re: Collision with entity owner
Reply With Quote #2

There is no sane way, you'll need to leave the owner unset and store your custom ownership info elsewhere.

Quote:
Originally Posted by MAGNAT2645 View Post
I know that my problem can be fixed with this (C++), but how i can do this with SourcePawn?
Client prediction would go badly wrong if you just did this on the server's ShouldCollide (which is all you could accomplish from a server plugin). That snippet is for mod development, and requires modification to both the client and server code.
__________________
asherkin is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 01-10-2017 , 17:37   Re: Collision with entity owner
Reply With Quote #3

Ohh, i'm stupid, Valve's code is for modification.

Ok, but is there other way to create loop for "Delete All Created Props", but with working collision for all players ? If i will disable owner entity, collision will work fine, but what can help me? ArrayList (maybe more useful) or StringMap?

I tried to use ArrayList ARRAY_Props[MAXPLAYERS + 1], but list wont work.
__________________

Last edited by MAGNAT2645; 01-10-2017 at 17:42.
MAGNAT2645 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 04:12.


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