Raised This Month: $ Target: $400
 0% 

*Actually* Change a players aiming angles?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-12-2007 , 15:28   *Actually* Change a players aiming angles?
Reply With Quote #1

I have searched for quite a while and have never seen anyone successfully do this.

I want to change the vector that a client's crosshair is aiming at.
(Reason has to do with DoD's style of recoil handling, a lot diff. than cs)

I can absolutely get the aim, by reading pev_v_angle or reading UC_ViewAngles, but neither actually do anything when I set them.

One of the threads on this forum suggested setting pev_fixangle to 1 after I set pev_v_angle. That's a misinterpretation - all pev_fixangle does is the equivelant of pressing the "Home" key on your keyboard in game - it brings your aim back to straight forward (y-angle-wise).

----------------------------------------

I have tried hooking CmdStart, which allows me to read UC_ViewAngles but not set them. I have tried this in normal register_forward() and as post.

Code:
public hook_CmdStart( id, uc_handle, seed ) {     if( !is_user_alive( id ) ) return FMRES_IGNORED;     if( g_logging[id] )     {         new Float:m_viewangles[3];         get_uc( uc_handle, UC_ViewAngles, m_viewangles );         g_logging[id] = 0;         console_print( id, "Get UC_ViewAngles currently {%f, %f, %f}", m_viewangles[0], m_viewangles[1], m_viewangles[2] );     }     else     {         set_uc( uc_handle, UC_ViewAngles, g_set[id] );         return FMRES_SUPERCEDE;     }         return FMRES_IGNORED; }

Note that g_set is a global variable set with a client command in a properly working function.

Has anyone ever actually changed where a player is aiming, or knows how?
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-12-2007 , 15:37   Re: *Actually* Change a players aiming angles?
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=61147

__________________
Voi is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 10-12-2007 , 17:18   Re: *Actually* Change a players aiming angles?
Reply With Quote #3

Quote:
Originally Posted by Wilson [29th ID] View Post
One of the threads on this forum suggested setting pev_fixangle to 1 after I set pev_v_angle. That's a misinterpretation - all pev_fixangle does is the equivelant of pressing the "Home" key on your keyboard in game - it brings your aim back to straight forward (y-angle-wise).
You are wrong, if you look at bots they are constantly set to 1. To my understanding fixangle is basically a server side setting to enforce clients to look a particular way.

To my knowledge AssKicR, Freecode and myself was the 1st to maniplate viewing angles of clients for AMX Mod when we created SoccerMod
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-12-2007 , 19:23   Re: *Actually* Change a players aiming angles?
Reply With Quote #4

Voi, I can't believe I actually missed that. I've seen that thread before too, but I never imagined it actually worked...
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-13-2007 , 00:28   Re: *Actually* Change a players aiming angles?
Reply With Quote #5

This works for me perfectly, but it's engine.


Code:
set_view_angle(id, Float:angles[3])   {     entity_set_vector(id, EV_VEC_angles, angles);     entity_set_int(id, EV_INT_fixangle, 1);     return;   }
__________________
alien is offline
Send a message via ICQ to alien
VEN
Veteran Member
Join Date: Jan 2005
Old 10-14-2007 , 08:07   Re: *Actually* Change a players aiming angles?
Reply With Quote #6

From HLSDK:
Quote:
int fixangle; // 0:nothing, 1:force view angles, 2:add avelocity
VEN is offline
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 16:06.


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