MisterDeath
Частый гость
Дата регистрации : Nov 2010
Проживает : asd
Сообщений : 91
Возраст: 29
Рейтинг
[кратко]
Пользователи:
-9.0 (1 )
Нарушения:
-0.9 (? )
Сообщения:
0.0 (Метки )
Регистрация:
8.6
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 )
3 UTIL_TraceLine ( pev->origin, pOther->pev->origin, dont_ignore_monsters, ENT(pev), &tr );
5 // ALERT( at_console, "%f\n", tr.flFraction );
7 if (tr.flFraction >= 0.90)
9 vecDir = pOther->pev->origin - pev->origin;
10 flDist = vecDir.Length( );
11 vecDir = vecDir.Normalize( );
12 flDot = DotProduct( gpGlobals->v_forward, vecDir );
14 if ((flDot > 0) && (flDist * (1 - flDot) < flMax))
16 flMax = flDist * (1 - flDot);
__________________
hl 4 ever
Сообщить модератору | IP: Записан
Сообщение: 82335