Topic: ?oordinates of the cursor[help]
Do mod.
How to get the coordinates of the cursor in the game?
And how do the calculation distance from the object?
How to get the coordinates of the player in his ID?
P.S. I use google translate !
You are not logged in. Please login or register.
Teeworlds Forum → Modifications → ?oordinates of the cursor[help]
Do mod.
How to get the coordinates of the cursor in the game?
And how do the calculation distance from the object?
How to get the coordinates of the player in his ID?
P.S. I use google translate !
Maybe you should try to download a client that supports that. I don't know what client though.
1.
From Client:
m_pClient->m_pControls->m_MousePos.x;
m_pClient->m_pControls->m_MousePos.y;
From Server:
** Need change the "m_Core" atribute to public or add a method for get it
GameServer()->m_apPlayers[CLIENT_ID]->GetCharacter()->m_Core.m_Input.m_TargetX;
GameServer()->m_apPlayers[CLIENT_ID]->GetCharacter()->m_Core.m_Input.m_TargetY;
------
2.
** Need import "vmath.h"
distance(vec2, vec2);
------
3.
From Client:
CNetObj_Character PrevChar = m_pClient->m_Snap.m_aCharacters[CLIENT_ID].m_Prev;
CNetObj_Character CurChar = m_pClient->m_Snap.m_aCharacters[CLIENT_ID].m_Cur;
vec2 Position = mix(vec2(PrevChar.m_X, PrevChar.m_Y), vec2(CurChar.m_X, CurChar.m_Y), Client()->IntraGameTick());
From Server:
GameServer()->m_apPlayers[CLIENT_ID]->GetCharacter()->m_Pos
what mod you do with that knowledge ?
unsigned char*
Thank you so much.
but I did not understand about the first point. Where his register.
Download source, use a IDE, use search function...
Teeworlds Forum → Modifications → ?oordinates of the cursor[help]
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.