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

HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- How the get hitgroup chest and not the origin? (https://hlfx.ru/forum/showthread.php?threadid=2975)


Отправлено MisterDeath 28-08-2011 в 15:50:

Post How the get hitgroup chest and not the origin?

Boys, how to get the hitgroup chest to follow the entity, the problem is the entity follow the origin and not the hirgroup, how to follow the hitgroup of the entity?

Sorry bad english

C++ Source Code:
1
while(( pOther = UTIL_FindEntityByClassname( pOther,"monster_scientist" )) != NULL )
2
{
3
  UTIL_TraceLine ( pev->origin, pOther->pev->origin, dont_ignore_monsters, ENT(pev), &tr );
4
 
5
  // ALERT( at_console, "%f\n", tr.flFraction );
6
 
7
  if (tr.flFraction >= 0.90)
8
  {
9
    vecDir = pOther->pev->origin - pev->origin;
10
    flDist = vecDir.Length( );
11
    vecDir = vecDir.Normalize( );
12
    flDot = DotProduct( gpGlobals->v_forward, vecDir );
13
 
14
    if ((flDot > 0) && (flDist * (1 - flDot) < flMax))
15
    {
16
      flMax = flDist * (1 - flDot);
17
      vecTarget = vecDir;
18
    }
19
  }
20
}
21
 

__________________
hl 4 ever


Отправлено HAWK0044 28-08-2011 в 19:43:

You can make hit boxes manually in .qc , and after , game make hitgroups..

OFFTOP: Your originaly language is?


Отправлено MisterDeath 29-08-2011 в 00:51:

Spanish

__________________
hl 4 ever


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

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