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

How to force full entity data update?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
V952
Member
Join Date: Jan 2012
Location: Odessa, Ukraine
Old 01-07-2014 , 23:31   How to force full entity data update?
Reply With Quote #1

Mod: HL2DM
Problem: When I die with a prop in my gravity gun, clientside is trying to predict it's position even though I'm already dead and the gravity gun is removed from the world. When I try to jump on to/pickup/shot the prop (a barrel for example) I'm getting the same thing - I pass through it. The reason for it is that client thinks that the prop needs to be predicted and ignore server data updates (I even debugged this). I wonder if there is a method to force FULL data update on single entity, like cl_fullupdate. Also is there a way to perform cl_fullupdate from server?

I've tried:
pEntity->edict()->StateChanged();
pEntity->NetworkProp()->MarkPVSInformationDirty();
pEntity->NetworkProp()->RecomputePVSInformation();
pEntity->NetworkProp()->NetworkStateChanged();
pEntity->NetworkProp()->NetworkStateForceUpdate();
Nothing works.
Thanks in advance.
__________________
HL2DM Real-Life Server: 195.138.78.198:27015
V952 is offline
Send a message via Skype™ to V952
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-08-2014 , 09:55   Re: How to force full entity data update?
Reply With Quote #2

Can's you force the prop to be serverside only?
There is a threshold for props being set client/serverside, and a cvar for kt
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
V952
Member
Join Date: Jan 2012
Location: Odessa, Ukraine
Old 01-08-2014 , 10:05   Re: How to force full entity data update?
Reply With Quote #3

Do you mean pEntity->AddEFlags(EFL_SERVER_ONLY); ? This will work only inside CEntityFactoryDictionary::Create while it's creating an entity, if I add this flag after it's already created it will do nothing. Also this will cause entity not being synced with client, like logical entities. In my case I have regular prop_physics with no additional settings.
P.S.: What cvar do you mean?
__________________
HL2DM Real-Life Server: 195.138.78.198:27015
V952 is offline
Send a message via Skype™ to V952
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-08-2014 , 15:43   Re: How to force full entity data update?
Reply With Quote #4

https://developer.valvesoftware.com/...lientside_size
Is the cvar/flag

This may not apply here, but it will update the entity:
http://docs.sourcemod.net/api/index....ad=show&id=67&

I think your problem is in pushaway, also whats your sv_turbophysics set at?
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
V952
Member
Join Date: Jan 2012
Location: Odessa, Ukraine
Old 01-08-2014 , 19:10   Re: How to force full entity data update?
Reply With Quote #5

sv_pushaway_clientside_size is a cvar that determines "Minimum size of pushback objects". In my case there is NO pushaway objects at all as I'm running HL2DM, not CSS! In HL2DM turbophysics is not available as it'd crash any server if some player will try to use his gravity gun. Anyway my question was about "how to perform FULL entity data update" while ChangeEdictState is a SM's variant of C++'s edict_t::StateChanged which will NOT perform full entity update. It'll mark edict as "dirty" and recalculate all netprops... and will do nothing because entity is not actually changed here. When I'm talking about FULL entity data update, I mean entity snapshot that will force client to delete all existing predicted entities and recreate them due to new data.
I've tried some engine hacks, but they're useless till I have no source code:
CFrameSnapshotManager::CreatePackedEntity(CFr ameSnapshot *, int)
CBaseClient::OnRequestFullUpdate(void)
__________________
HL2DM Real-Life Server: 195.138.78.198:27015
V952 is offline
Send a message via Skype™ to V952
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-09-2014 , 10:33   Re: How to force full entity data update?
Reply With Quote #6

Dunno I had a similar type-problem for a portal/grabber mod, I ended up just killing the entity and making a new one with the exact same values :/
Was for tf2.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
V952
Member
Join Date: Jan 2012
Location: Odessa, Ukraine
Old 01-09-2014 , 10:36   Re: How to force full entity data update?
Reply With Quote #7

I guess this is the only way :c
__________________
HL2DM Real-Life Server: 195.138.78.198:27015
V952 is offline
Send a message via Skype™ to V952
V952
Member
Join Date: Jan 2012
Location: Odessa, Ukraine
Old 01-10-2014 , 12:37   Re: How to force full entity data update?
Reply With Quote #8

Ok. I've solved my problem. The bug is caused if client receives entity destroy packet before CNetworkVar change packet or simply if the active weapon was changed. The way to solve the problem is to force player to drop of carrying objects and wait 0.1 - 0.4 seconds and remove entity/switch to another weapon then.
__________________
HL2DM Real-Life Server: 195.138.78.198:27015
V952 is offline
Send a message via Skype™ to V952
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 13:40.


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