Player View Angles
Can they be changed easily?
I found a function within CBasePlayer that I think can do it (SnapEyeAngles) but the project I'm working in has a problem trying to include the files that contain CBasePlayer, throwing a slew of errors like m_hOwnerEntity is undefined, m_hMoveParent undefined, m_hUseEntity, n_hVehicle, m_hObserverTarget, m_hZoomerOwner, m_hOwner, m_hLightingOrigin/Relative, m_hCtrl, m_hActiveWeapon, all undefined for some reason I have all the environment variables set up correctly, and I included several required files, but including cbase.h throws many errors, and including just player.h does too So my main question is 2 fold: Is there a way to change player view angles without including this, or is there a way to fix these problems and just use the premade stuff |
Re: Player View Angles
Well, tampering with the players usercmds is probably the best solution.
https://forums.alliedmods.net/showthread.php?t=255101 |
Re: Player View Angles
Quote:
Edit: And actually, in the hl2sdk in usercmd.h, it has a code block that turns some parts of the hook into local only, viewangle is one, at least that's what I'm led to believe |
Re: Player View Angles
WELP, everything in this has become irrelevant
It's sending the angles serverside, but not clientside, I'm shooting people behind me, the equivelant of a silent aim aimbot It's good enough for me, but meh |
Re: Player View Angles
If you want visible view angle changes you can call CBaseAnimating?::Teleport(virtual function, no signature required).
Teleport(Vector const *newPos, QAngle const *newAngles, Vector const *newVelocity) just pass NULL to newPos and newVelocity |
Re: Player View Angles
Quote:
This is where the original problem comes in, baseentity.h has errors Edit: Looking at the teleport code, I see it also just uses SnapEyeAnles Edit 2: I looked at SnapEyeAngles, and it uses CPlayerState, which IServerGameClients can retrieve and use, so I used the method SnapEyeAngles uses and it works!
Spoiler
|
Re: Player View Angles
Congratulations, you've learnt why SM's gamedata files exist.
|
Re: Player View Angles
A new problem emerged that the eye angles never leave 0.0 in pitch
|
Re: Player View Angles
I think you're probably looking at roll instead of pitch.
|
Re: Player View Angles
Quote:
The piece of code I have was being used on bots |
All times are GMT -4. The time now is 10:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.