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 :

Action Half-LifeAction Half-Life

Action Half-life был сделан для того, чтобы имитировать участие в съемках голливудского боевика...

20/07/2009
Vampire SlayerVampire Slayer

Сетевой мод про вампиров и охотников...

20/07/2005
Stat ( maps ), pcs.

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


  • Description
  • HOW TO INSTALL

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

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


Author/s of tutorial : Jack-Hang
Views : 1807 ( +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. Исходный код снайперки - weapon_sniperrifle с оптическим прицелом
2. Quake strafing & DoD bobing styles - Вот от нечего делать я решил немножко изменить стиль игры в оригинальной хл.
You cannot comment, because you are not logged-in.
    In premoderation
    In premoderation
    cs_peuvana
    Counter-Strike 1.6cs_peuvana
    Mass Effect Omnitool / Инструментрон из Mass Effect
    Counter-Strike 1.6Mass Effect Omnitool / Инструментрон из Mass Effect
    Bomb Site
    Counter-Strike 1.6Bomb Site