It would appear that m_angEyeAngles is a networked vector that should
work, however, I was not able to get any value out of it ont he client
side, it was always 0,0,0 for the player entities client side. It
other words, a clients representation of all the other players. I
edited
The ShouldTransmit fucn in player.cpp to add these lines

if(pRecipientEntity->IsPlayer())
        {
                CBasePlayer* pPlayer = (CBasePlayer*)pRecipientEntity;
                if(pPlayer->IsObserver())
                {
                        if(pPlayer->GetObserverTarget() == this)
                        {
                                return FL_EDICT_ALWAYS;
                        }
                }
        }

So any spectator, specting a player would receive information about that player.

m_angEyeAngles would still not work after this so i decided to change
a variable that I know worked: v_angle.

I copied the format for the deadflag variable which was also networked
and belonged to the same class.

The only difference I made was that I changed a flag to have it send
often as such:

SendPropQAngles( SENDINFO(v_angle), 13, SPROP_CHANGES_OFTEN ),

This variable worked. Inside of CalcInEyeCamView, i changed the line
eyeAngles = target->EyeAngles();

to

eyeAngles =     pPlayer->pl.v_angle;

This worked and my eye mode was now working, but not very well. It was
very choppy or laggy. I'm not sure if this was just lag (now that I
think about, maybe if should check net_graph2, (Ill do that after this
email, however nothing else was laggy in the game) or I was networking
this var wrong.

What really bugs me Is that I should not have to do any of this. Each
client already know the view angle for each other client, otherwise
they would not seem them rotating around when they looked. Unless that
value is something other than m_angEyeAngles , then I cant figure it
out.

I'm guessing everyone wants spectator mode to work in thier mod, and
Im guessing not many people have eye mode working unless the SDK has
changed recently so I'll release a small tutorial when im done, but
i'm kinda stuck right now.

The function that sets the spectators eye angle is CalcInEyeCamView.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to