HLFX.Ru Forum
Показать все 2 сообщений этой темы на одной странице

HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Get the current velocity of a player in client (https://hlfx.ru/forum/showthread.php?threadid=3761)


Отправлено MisterDeath 14-01-2013 в 00:33:

Half-Life Get the current velocity of a player in client

In server to get the velocity is "pev->velocity"...

How to get the current velocity of a player in the client ?

__________________
hl 4 ever


Отправлено Ku2zoff 14-01-2013 в 06:22:

Something like this:

C++ Source Code:
cl_entity_t *player = gEngfuncs.GetLocalPlayer();
vec3_t velocity = player->curstate.velocity;

Or this, if code written inside some function from view.cpp:
C++ Source Code:
vec3_t velocity;
VectorCopy(pparams->simvel, velocity);


Временная зона GMT. Текущее время 21:46.
Показать все 2 сообщений этой темы на одной странице

На основе vBulletin версии 2.3.0
Авторское право © Jelsoft Enterprises Limited 2000 - 2002.
Дизайн и программирование: Crystice Softworks © 2005 - 2024