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 :

The Mercenaries 3D Classic Edition - Stages From RE: RemakeThe Mercenaries 3D Classic Edition - Stages From RE: Remake

Мод заменяет стандартные сценарии в режиме Наемников на новые из Resident Evil: Remake...

4/10/2014
Half-Life 2: Socialist TensionHalf-Life 2: Socialist Tension

Брина устранить непросто......

13/09/2006
Stat ( comments ), pcs.

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


  • Description
  • HOW TO INSTALL

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

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


Author/s of tutorial : Jack-Hang
Views : 1713 ( +1 )
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. Разбираемся в коде пушки МР5 - По просьбам трудящихся коментирую код МР5
2. Добавление новых классов для монстр - Мы будем добавлять новый класс Блэк Опс из Оппосинг Форс
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 | Карта на прохождение
    Cam The Fox
    Half-LifeCam The Fox