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:
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
Отправлено 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