mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #4760
4760: Update local hook collision line every frame. r=def- a=sjrc6 Changed the data source for local player angle so it updates every frame instead of once per tick. I tested and it's still accurate even when mouse position is very close to the center. ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [x] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Tater <Mr.Potatooh@gmail.com>
This commit is contained in:
commit
ce3539e285
|
@ -288,7 +288,7 @@ void CPlayers::RenderPlayer(
|
||||||
vec2 ExDirection = Direction;
|
vec2 ExDirection = Direction;
|
||||||
|
|
||||||
if(Local && Client()->State() != IClient::STATE_DEMOPLAYBACK)
|
if(Local && Client()->State() != IClient::STATE_DEMOPLAYBACK)
|
||||||
ExDirection = normalize(vec2(m_pClient->m_Controls.m_InputData[g_Config.m_ClDummy].m_TargetX, m_pClient->m_Controls.m_InputData[g_Config.m_ClDummy].m_TargetY));
|
ExDirection = normalize(vec2((int)m_pClient->m_Controls.m_MousePos[g_Config.m_ClDummy].x, (int)m_pClient->m_Controls.m_MousePos[g_Config.m_ClDummy].y));
|
||||||
|
|
||||||
Graphics()->TextureClear();
|
Graphics()->TextureClear();
|
||||||
vec2 InitPos = Position;
|
vec2 InitPos = Position;
|
||||||
|
|
Loading…
Reference in a new issue