> My problem is how I got about changing the player's viewpoint to that of
the camera's.  I'm not too
> familliar with the HLSDK, so I'm feeling a bit overwhelmed by edicts and
entvars, etc.
>
> For testing, I'd like to connect switching to toggle the viewpoint to an
impulse, and eventually
> have it always fixed for the actual game.  This seems easy enough, but I'm
getting stuck in some
> minor details.
>
> I guess it comes down to a couple things:  I need to be able to get a
reference to the
> info_smash_cam, and then set the player's viewpoint to the camera's
viewpoint.  Any hints?

The SET_VIEW() macro will allow you to change the player's view to another
entity.  For example...

SET_VIEW(pPlayer->edict(), pSmashCam->edict());

...will change the player's view to view from the SmashCam entity (assuming
you've set the pPlayer and pSmashCam to the Player entity and SmashCam
entity before this).

Calling SET_VIEW() with the player edict for both parameters will set the
player's camera back to within their own head, i.e....

SET_VIEW(pPlayer->edict(), pPlayer->edict());

Jeffrey "botman" Broome


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

Reply via email to