It is networked though, It's never been invalid for me; other than it's not
predicted.
So either something is wiping it out for you, or you're trying to catch an
impulse use.
It will only ever be valid outside of one frame (And networked) if it's a
continuous use, (ie: holding the use button on something, and holding onto
the target) if you're just using a simple button for example, the client
will never see it, because it only has a value for one frame, and then the
next frame it's cleared (so you don't keep using an "impulse" (one time)
entity)

-Tony



On Sun, Apr 14, 2013 at 5:01 AM, Andrew McWatters <mcwattersand...@gmail.com
> wrote:

> I don't know how to state it much simpler than that. This is an issue that
> has existed for years; now is as good a time as ever to complain about it,
> I guess.
>
> For mods in the 2007 engine branch, checking GetUseEntity() on the client
> returns NULL, which does not match the server's value at any point in time.
>
> On the client, SetUseEntity is never actually called, but on the server it
> is, which should then send the EHANDLE over the wire. Otherwise what would
> be the point in it being a networked variable? Right?
>
> Anyway, some really important prediction stuff goes wrong as a result of
> m_hUseEntity never being set, such as this key snippet in
> CBasePlayer::ItemPostFrame() here:
>
> baseplayer_shared.cpp: 208-216
> // check if the player is using something
> if ( m_hUseEntity != NULL )
>  {
> #if !defined( CLIENT_DLL )
> Assert( !IsInAVehicle() );
> ImpulseCommands();// this will call playerUse
> #endif
> return;
> }
>
> As a result of this never returning, (since m_hUseEntity is actually NULL
> client-side,) when you hold your primary attack button, things like
> ::PrimaryAttack() being called on weapons on the client every frame but not
> on the server manifest, and the end result is the weapon sound for your
> active weapon being spammed violently.
>
> I've checked out Send/RecvProps and such and everything is fine other than
> this value never being networked.
>
> How can this be fixed?
>
> Thanks,
> Andrew
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>


-- 
-Tony
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to