View Single Post
Re: Podbot Beta 3.0 Updates? ^^
Old
  (#219)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default Re: Podbot Beta 3.0 Updates? ^^ - 10-06-2008

KWo, why to you to not make so on/off flashlight so: "pEdict->v.impulse 100;" ?

I personally for YaPB bot have made so:

PHP Code:
void Bot::SwitchFlashlight (bool on)
{
    
// this function switches on/off the flashlight of a bot.

    
if
    (
        
m_isReloading ||
        
strncmp ("zombie"GetModelName (GetEntity ()), 6) == ||
        (
            (
on && (!g_botVar[Variable_FlashLight]->GetBool () || (pev->effects EF_DIMLIGHT) || m_flashLightBattery == || !IsAlive (GetEntity ()))) ||
            (!
on && !(pev->effects EF_DIMLIGHT))
        )
    )
        return;

    
// switch on/off the flash light
    
pev->impulse 100;

It would solve some problems with flashlight battery & else...

& P.S. googles is written goggles
  
Reply With Quote