![]() |
Показать все 13 сообщений этой темы на одной странице |
HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Nightvision (https://hlfx.ru/forum/showthread.php?threadid=4068)
Nightvision
I maked a Night Vision... this is the code:
1 | gEngfuncs.pTriAPI->RenderMode(kRenderTransAdd); |
2 |
3 | gEngfuncs.pTriAPI->SpriteTexture( (struct model_s *)gEngfuncs.GetSpritePointer(SPR_Load("sprites/nvg.spr")),gEngfuncs.pfnRandomLong(0,7)); |
4 |
5 | gEngfuncs.pTriAPI->Color4f( 0.0, 1.0, 0.0, 1.0 ); |
6 |
7 | glEnable(GL_BLEND); |
8 | glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR); |
9 |
10 | gEngfuncs.pTriAPI->CullFace(TRI_NONE); |
11 | gEngfuncs.pTriAPI->Begin(TRI_QUADS); |
12 |
13 | gEngfuncs.pTriAPI->TexCoord2f(0.0f, 1.0f); |
14 | gEngfuncs.pTriAPI->Vertex3f(0, 0, 0); |
15 |
16 | gEngfuncs.pTriAPI->TexCoord2f(0.0f, 0.0f); |
17 | gEngfuncs.pTriAPI->Vertex3f(0, ScreenHeight, 0); |
18 |
19 | gEngfuncs.pTriAPI->TexCoord2f(1.0f, 0.0f); |
20 | gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, ScreenHeight, 0); |
21 |
22 | gEngfuncs.pTriAPI->TexCoord2f(1.0f, 1.0f); |
23 | gEngfuncs.pTriAPI->Vertex3f(ScreenWidth, 0, 0); |
24 |
25 | gEngfuncs.pTriAPI->End(); |
26 | gEngfuncs.pTriAPI->RenderMode(kRenderNormal); |
__________________
hl 4 ever
MisterDeath where have you seen a nightvision did make fullbright?
__________________
-Brain is dead-
KiQ in opposing force and other mods, I suppose.
MisterDeath client - no. server - yes. EF_BRIGHTFIELD for player when NV is on.
__________________
__________________
hl 4 ever
__________________
__________________
hl 4 ever
MisterDeath
afaik opfor uses dlight.
__________________
But i can render ALL OBJECTS IN THE VIEW OF PLAYER...
The OpFor nightvision have a limited radius...
__________________
hl 4 ever
MisterDeath just use EF_BRIGHTLIGHT
__________________
My Projects: download page
F.A.Q по XashNT
Блог разработчика в телеграме
C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'
EF_BRIGHTLIGHT....
Very small...
__________________
hl 4 ever
MisterDeath
CL_AllocDlight with a large radius on client then.
__________________
I not have other choice... i will use a large radius dlight... thanks
__________________
hl 4 ever
U also can set pev->effects = 0 for all entities in AddToFullpack.
Временная зона GMT. Текущее время 14:14. | Показать все 13 сообщений этой темы на одной странице |
На основе vBulletin версии 2.3.0
Авторское право © Jelsoft Enterprises Limited 2000 - 2002.
Дизайн и программирование: Crystice Softworks © 2005 - 2024