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

HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Sprite on attachment (https://hlfx.ru/forum/showthread.php?threadid=4086)


Отправлено MisterDeath 09-09-2013 в 22:16:

Half-Life Sprite on attachment

The sprite creation

C++ Source Code:
1
cl_entity_t *pClient;
2
pClient = gEngfuncs.GetViewModel();
3
 
4
TEMPENTITY *pSprite = gEngfuncs.pEfxAPI->R_TempSprite( pClient-
5
>attachment[0], Vector( 0,0,0 ), 0.5, gEngfuncs.pEventAPI-
6
>EV_FindModelIndex( "sprites/hotglow.spr" ), kRenderTransAdd,
7
kRenderFxNone, 255.0, 1.0, 0 );
8
 
9
pSprite->flags |= ( FTENT_CLIENTCUSTOM );
10
pSprite->callback = EV_MuzzleflashCallback;


The sprite callback:
C++ Source Code:
1
void EV_MuzzleflashCallback ( struct tempent_s *ent, float frametime, float currenttime )
2
{
3
  cl_entity_t *pClient;
4
  pClient = gEngfuncs.GetViewModel();
5
 
6
  ent->entity.origin = pClient->attachment[0];
7
}


Not moving:
http://img818.imageshack.us/img818/2561/shz.png

Moving ( THE BUG !!! ):
http://img194.imageshack.us/img194/9938/ov1h.png

If shoot moving, the sprite on the attachment create in the opposite position of movement...

( SORRY BAD ENGLISH )

__________________
hl 4 ever


Отправлено Дядя Миша 10-09-2013 в 08:11:

Make sure what sprite creation calling from HUD_StudioEvent. It's very important.

__________________
My Projects: download page

F.A.Q по XashNT
Блог разработчика в телеграме

Цитата:

C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'


Отправлено MisterDeath 10-09-2013 в 13:59:

Цитата:
Дядя Миша писал:
Make sure what sprite creation calling from HUD_StudioEvent. It's very important.


The problem persists... !

__________________
hl 4 ever


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

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