HLFX.Ru Forum
Показать все 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)


Отправлено MisterDeath 30-08-2013 в 18:40:

Half-Life Nightvision

I maked a Night Vision... this is the code:

C++ Source 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);


The result is:



But... how to render ALL objects in "fullbright" mode ??? ( but in CLIENT )

__________________
hl 4 ever


Отправлено KiQ 30-08-2013 в 18:57:

MisterDeath where have you seen a nightvision did make fullbright?

__________________
-Brain is dead-


Отправлено XaeroX 30-08-2013 в 18:58:

KiQ in opposing force and other mods, I suppose.
MisterDeath client - no. server - yes. EF_BRIGHTFIELD for player when NV is on.

__________________

xaerox on Vivino


Отправлено MisterDeath 30-08-2013 в 19:22:

Цитата:
XaeroX писал:


EF_BRIGHTFIELD Make a particles around the player...

I Can render all objects ( models, sprites, map... ), like this image... in the rendered scene of the VHE....

__________________
hl 4 ever


Отправлено XaeroX 30-08-2013 в 19:39:

Цитата:
MisterDeath писал:
EF_BRIGHTFIELD Make a particles around the player..

Okay, then EF_BRIGHTLIGHT.

__________________

xaerox on Vivino


Отправлено MisterDeath 30-08-2013 в 19:51:

Цитата:
XaeroX писал:

Цитата:
XaeroX писал:


I can't use a dlight ( this render a specific radius )... i can use a method to render ALL objects ( in the vision of the player )...

__________________
hl 4 ever


Отправлено XaeroX 30-08-2013 в 19:53:

MisterDeath
afaik opfor uses dlight.

__________________

xaerox on Vivino


Отправлено MisterDeath 30-08-2013 в 20:04:

But i can render ALL OBJECTS IN THE VIEW OF PLAYER...

The OpFor nightvision have a limited radius...

__________________
hl 4 ever


Отправлено Дядя Миша 30-08-2013 в 20:05:

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'


Отправлено MisterDeath 30-08-2013 в 20:24:

EF_BRIGHTLIGHT....



Very small...

__________________
hl 4 ever


Отправлено XaeroX 30-08-2013 в 20:27:

MisterDeath
CL_AllocDlight with a large radius on client then.

__________________

xaerox on Vivino


Отправлено MisterDeath 30-08-2013 в 20:42:

I not have other choice... i will use a large radius dlight... thanks

__________________
hl 4 ever


Отправлено ILZM 31-08-2013 в 17:16:

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