I might be missing something obvious, but can't you just override

*Player::GetRenderAngles()

or

*PlayerAnimState::GetRenderAngles()

or find out where it's fudging m_angRender in the playeranimstate

// Rotate entire body into position
m_angRender[YAW] = m_flCurrentFeetYaw;
m_angRender[PITCH] = m_angRender[ROLL] = 0;

and make it do what you want there?

garry


On Sun, Aug 19, 2012 at 5:20 PM, Michael Kramer <kra...@siosphere.com>wrote:

> If I attempt to modify the player angles in gamemovement, nothing changes,
> even though it is the last step pretty much, it should be able to overwrite
> everything else.
>
> Adjusting the angles in playermove, does work, even though it is called
> way before gamemovement.
>
> I can adjust the viewangles (engine->SetViewAngles()) in gamemovement, but
> can't adjust the player angles at all.
>
> Your hierarchy is very helpful though, so thank you for that, but it seems
> like finishmove does not use the angles from gamemovement, the code is in
> there (player->SetLocalAngles( move->m_vecAngles );) but no matter what
> m_vecAngles is set at, nothing changes even the slightest.
>
> I was hoping that animstate would update relative to the model/entities
> position, but it does seem like it is overwriting anything sent back from
> gamemovement in regards to angles. If I adjust the angles in animstate it
> properly updates.
>
> I can do this without updating angles at all, simply with a barrel roll
> animation, but was hoping I could do it all code wise easily.
>
> On Sun, Aug 19, 2012 at 1:54 AM, Tony "omega" Sergi 
> <omegal...@gmail.com>wrote:
>
>> It's not that it's "all over the place" but rather they are different
>> components of the entire process.
>> The majority of the actual movement is handled inside gamemovement.
>> the in_* (CInput) handles the raw input itself for the local client (and
>> by default the view angles as manipulated by the mouse) which puts it into
>> CUserCmd. CUserCmd is then transmitted every frame down to the server which
>> is used by playermove and finally into CGameMovement for the final step,
>> and CPrediction also uses it to predict locally.
>> Once all of that is done, animstate is called from postthink every frame
>> to take the final result of everything and then decides what animations to
>> play as well as the final rendering angles of the player.
>>
>> So to summarize the whole process (from memory here, I might be missing
>> something):
>>
>> Input - Create CUserCmd
>> CUserCmd is sent for each frame to the server, and processed locally with
>> prediction
>> CPlayerMove then does:
>>   some prelimilary copy like eyeangles and buttons
>>    prethink (calls prethink on the player)
>>    think (calls think on the player if set)
>>    setupmove (copy usercmd -> CMoveData)
>>      gamemovement
>>    finishmove (update the player origin, angles, etc from gamemovement
>> (CMoveData)
>>  postthink (run animstate)
>>
>> the client-side is slightly different for networked players, but the
>> local player runs the same process (more or less, through CPrediction
>> instead of PlayerRunCommand.
>>
>> and note, that it doesn't happen precisely in that order for every
>> command, as the client will run and transmit input/CUserCmd as fast as it
>> can.
>>
>> Gamemovement is where you should be handling your "barrel roll"; why that
>> it's not working for you, I cannot say as I cannot see your implementation.
>>
>> -Tony
>>
>>
>>
>>
>> On Sun, Aug 19, 2012 at 2:07 PM, Michael Kramer <kra...@siosphere.com>wrote:
>>
>>> Alright, I was able to modify the angles by adding some code into the
>>> multiplayer animstate, but I have a question for you.
>>>
>>> It seems that gamemovement adjusts only the origin, and not the
>>> viewangles/player angles at all, so I'm assuming adding anything in there
>>> would be wrong to do.
>>> It also seems like the movement code is all over the place, in player,
>>> gamemovement, in_mouse, playermove, etc is there a reason it is spread all
>>> over the place?
>>>
>>> It seems like ideally all player movement should be controlled in 1
>>> place, and not 5 or 6 different areas...
>>>
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>
>>
>>
>
>
> --
> *Michael Kramer, Software Engineer & SEO Expert*
> http://www.siosphere.com | kra...@siosphere.com
>  *[c] 801-530-9454*
> *
> *
> *
> *
>
> --------------------------------------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify the system manager.
> This message contains confidential information and is intended only for the
> individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system. If you are not the intended recipient
> you are notified that disclosing, copying, distributing or taking any
> action in reliance on the contents of this information is strictly
> prohibited.
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>
_______________________________________________
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