Sign up - or - Login

Recover password
×

To recover your password, you must enter the username or e-mail that you used during the registration. After that, a mail with a security code will be sent to your inbox.

Your username or e-mail :

Black GuardBlack Guard

Тяжкий день офицера...

23/05/2013
Blue PortalsBlue Portals

is a unique Portal mod that has players traverse through new test chambers using only the single portal device and many ...

28/11/2010
Stat ( tutorials ), pcs.

Мазлфлэш на брашах


  • Description
  • HOW TO INSTALL

Мазлфлэш на брашах

Мазлфлэш на брашах


Author/s of tutorial : Jack-Hang
Views : 1740 ( +2 )
Uploader : Streit
Created : 04/07/2011 9:24:08 PM
Source : http://www.hang-over.ucoz.ru...
Rating :
 ( 5 ) 
Share :


Following translations are available : | russian |

Откроем ev_hldm.h, Где-то в конце добавим:

Code:

void EV_HLDM_MuzzleFlash( vec3_t pos, float amount );

Потом откроем ev_hldm.cpp, вставим где-то после этого:

Code:

// play a strike sound based on the texture that was hit by the attack traceline. VecSrc/VecEnd are the
// original traceline endpoints used by the attacker, iBulletType is the type of bullet that hit the texture.
// returns volume of strike instrument (crowbar) to play
float EV_HLDM_PlayTextureSound( int idx, pmtrace_t *ptr, float *vecSrc, float *vecEnd, int iBulletType )

Вот это:

Code:

void EV_HLDM_MuzzleFlash(vec3_t pos, float amount)
{
   dlight_t *dl = gEngfuncs.pEfxAPI->CL_AllocDlight(0);
   dl->origin = pos;
   dl->color.r = 255; // red
   dl->color.g = 255; // green
   dl->color.b = 128; // blue
   dl->radius = amount * 100;
   dl->die = gEngfuncs.GetClientTime() + 0.01;
}

Найдите функцию:

Code:

void EV_FireGlock1( event_args_t *args )

Найдите в ней:

Code:

EV_GetGunPosition( args, vecSrc, origin );

Прямо после неё вставьте это:

Code:

EV_HLDM_MuzzleFlash( vecSrc, 1.0 + gEngfuncs.pfnRandomFloat( -0.2, 0.2 ) );

Интенсивность освещения ~1.0, умножается на 100, и получается где от 80 до 120 радиус каждый раз по разному, для разнообразия. Можете ставить по больше чтобы была ярче вспышка, 1.0 это для Глока в самый раз а для автомата где-то 2.5 или 3.0



Similar1. Два цвета крови у зомби - Два цвета крови у зомби
2. Сохранение анимаций - как сделать так чтобы анимации на оружии(допустим) сохранялись, например все помнят КС вот там был Usp
3. Переключение оружия a la HL2 - Мне не нравится, как переключается оружие в ХЛ. Может, кому-то и интересно тыкать по менюшкам худа, но мне больше нравится реализация переключения в Unreal RTN, Quake Mission Packs и HL2
4. Увеличение количества мяса от взрыв - Увеличение количества мяса от взрывов людей или инопланетян.
5. Как перекрасить пули в ХЛ - Здесь я вам расскажу, как можно перекрасить пули в Half-Life1 и приведу свой пример
6. Sparks - Как добавить искры
You cannot comment, because you are not logged-in.
    Plumber
    Half-Life 2Plumber
    BLENDER в BSP
    Half-Life 2BLENDER в BSP
    The Lost Temple | Карта на прохождение
    Garrys modThe Lost Temple | Карта на прохождение