gamemovement:

::CheckParameters

--snip--
    if ( !IsDead() )
    {
        v_angle = mv->m_vecAngles;
        v_angle = v_angle + player->m_Local.m_vecPunchAngle;

        // Now adjust roll angle
        if ( player->GetMoveType() != MOVETYPE_ISOMETRIC  &&
             player->GetMoveType() != MOVETYPE_NOCLIP )
        {
            mv->m_vecAngles[ROLL]  = CalcRoll( v_angle, mv->m_vecVelocity,
sv_rollangle.GetFloat(), sv_rollspeed.GetFloat() );
        }
        else
        {
            mv->m_vecAngles[ROLL] = 0.0; // v_angle[ ROLL ];
        }
        mv->m_vecAngles[PITCH] = v_angle[PITCH];
        mv->m_vecAngles[YAW]   = v_angle[YAW];
    }
--snip--


On Mon, Aug 20, 2012 at 11:23 AM, Michael Kramer <kra...@siosphere.com>wrote:

> Modifying it in the animstate does properly do what I'm wanting, I just
> didn't know if it was proper, it seems like modifying the roll values in
> gamemovement would carry over, but no where in the animstate does it
> overwrite the angles passed in by gamemovement, but doesn't seem to carry
> over ROLL.
>
> I think I'll just modify animstate to properly read the angles from
> gamemovement.
>
> Thanks everyone,
>
>
> On Sun, Aug 19, 2012 at 10:29 AM, Garry Newman <garrynew...@gmail.com>wrote:
>
>> 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
>>
>>
>>
>
>
> --
> *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
>
>
>


-- 
-Tony
_______________________________________________
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