DETOUR_DECL_STATIC(bool __gcc_regcall, ParseDynamicAttributes, void *ecattr, KeyValues *kv) { DevMsg("ParseDynamicAttributes: \"%s\" \"%s\"\n", kv->GetName(), kv->GetString()); if (V_stricmp(kv->GetName(), "ExtAttr") == 0) { auto ext = reinterpret_cast<CTFBot::ExtendedAttr *>((uintptr_t)ecattr + 0x10); const char *val = kv->GetString(); if (V_stricmp(val, "AlwaysFireWeaponAlt") == 0) { DevMsg(" found: ExtAttr AlwaysFireWeaponAlt\n"); ext->TurnOn(ExtAttr::ALWAYS_FIRE_WEAPON_ALT); } else if (V_stricmp(val, "TargetStickies") == 0) { DevMsg(" found: ExtAttr TargetStickies\n"); ext->TurnOn(ExtAttr::TARGET_STICKIES); } else { Warning("TFBotSpawner: Invalid extended attribute '%s'\n", val); } DevMsg(" Got ExtAttr, returning true\n"); return true; } DevMsg(" Passing through to actual ParseDynamicAttributes\n"); return DETOUR_STATIC_CALL(ParseDynamicAttributes)(ecattr, kv); }
//----------------------------------------------------------------------------- // Purpose: Input handler to turn the lightning on either continually or for // interval refiring. //----------------------------------------------------------------------------- void CEnvBeam::InputTurnOn( inputdata_t &inputdata ) { if ( !m_active ) { TurnOn(); } }
void CFuncWall :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if( IsLockedByMaster( pActivator )) return; if( ShouldToggle( useType )) { if( GetState() == STATE_ON ) TurnOff(); else TurnOn(); // LRC (support generic switchable texlight) if( m_iStyle >= 32 ) { if( pev->frame ) LIGHT_STYLE( m_iStyle, "z" ); else LIGHT_STYLE( m_iStyle, "a" ); } else if( m_iStyle <= -32 ) { if( pev->frame ) LIGHT_STYLE( -m_iStyle, "a" ); else LIGHT_STYLE( -m_iStyle, "z" ); } } }
void CLaser::Spawn(void) { if(FStringNull(pev->model)) { SetThink(&CLaser::SUB_Remove); return; } pev->solid = SOLID_NOT; // Remove model & collisions Precache(); SetThink(&CLaser::StrikeThink); pev->flags |= FL_CUSTOMENTITY; PointsInit(pev->origin, pev->origin); if(!m_pSprite && m_iszSpriteName) m_pSprite = CSprite::SpriteCreate(STRING(m_iszSpriteName), pev->origin, TRUE); else m_pSprite = NULL; if(m_pSprite) m_pSprite->SetTransparency(kRenderGlow, pev->rendercolor.x, pev->rendercolor.y, pev->rendercolor.z, pev->renderamt, pev->renderfx); if(pev->targetname && !(pev->spawnflags & SF_BEAM_STARTON)) TurnOff(); else TurnOn(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CEnvLaser::InputTurnOn( inputdata_t &inputdata ) { if (!IsOn()) { TurnOn(); } }
void InputToggle( inputdata_t &inputdata ) { if ( m_isOn ) TurnOff(); else TurnOn(); }
void Weldingtool::AttackBy(id_ptr_on<Item> item) { if (Working()) TurnOff(); else TurnOn(); }
void CFuncWallToggle :: Spawn( void ) { BaseClass::Spawn(); if( FBitSet( pev->spawnflags, SF_WALL_START_OFF )) TurnOff(); else TurnOn(); }
int Perspective::setupCamera() { glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( fovy, 800.0f/600.0f, zNear, zFar ) ; /* XXX VAR GLOBAL PARA JANELA*/ TurnOn(); return 1; }
int moEffect::luaEnable(moLuaVirtualMachine& vm) { lua_State *luastate = (lua_State *) vm; TurnOn(); return 0; }
void CParticleEmitter :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if (ShouldToggle(useType, pev->body)) { if (pev->spawnflags & SF_START_ON) TurnOff(); else TurnOn(); } }
void CFuncShine :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if (ShouldToggle(useType)) { if (pev->spawnflags & SF_SHINE_ACTIVE) TurnOff(); else TurnOn(); } }
//----------------------------------------------------------------------------- // Purpose: Input handler for toggling the hidden/shown state of the brush. //----------------------------------------------------------------------------- void CFuncBrush::InputToggle( inputdata_t &inputdata ) { if ( IsOn() ) { TurnOff(); return; } TurnOn(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CEnvLaser::InputToggle( inputdata_t &inputdata ) { if ( IsOn() ) { TurnOff(); } else { TurnOn(); } }
void main(void) { serialBegin(9600); TurnOn(9600); //module power on InitParam(PARAM_SET_1); //configure the module Echo(1); //enable AT echo ver=LibVer(); printf("Response Ver %d\n",ver); }
//----------------------------------------------------------------------------- // Purpose: Input handler to toggle the lightning on/off. //----------------------------------------------------------------------------- void CEnvBeam::InputToggle( inputdata_t &inputdata ) { if ( m_active ) { TurnOff(); } else { TurnOn(); } }
void CEnvFireSource::Spawn() { if ( m_spawnflags & SF_FIRESOURCE_START_ON ) { TurnOn(); } else { TurnOff(); } }
//----------------------------------------------------------------------------- // Purpose: Input handler that toggles the sprite between hidden and shown. //----------------------------------------------------------------------------- void CSprite::InputToggleSprite( inputdata_t &inputdata ) { if ( !IsEffectActive( EF_NODRAW ) ) { TurnOff(); } else { TurnOn(); } }
void CEnvFireSensor::Spawn() { if ( m_spawnflags & SF_FIRESENSOR_START_ON ) { TurnOn(); } else { TurnOff(); } }
void CPVFXMgr::HandleFXKey(ArgList* pArgList) { if (!pArgList) return; if (pArgList->argc < 3 || !pArgList->argv[1] || !pArgList->argv[2]) return; char* pFXName = pArgList->argv[1]; char* pFXState = pArgList->argv[2]; // Turn on/off the necessary fx... TurnOn(pFXName, (stricmp(pFXState, "ON") == 0)); }
/* <1e101> ../cstrike/dlls/bmodels.cpp:130 */ void CFuncWallToggle::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { int status = IsOn(); if (ShouldToggle(useType, status)) { if (status) TurnOff(); else TurnOn(); } }
//----------------------------------------------------------------------------- // Purpose: Toggle the light on/off //----------------------------------------------------------------------------- void CLight::Toggle( void ) { //Toggle it if ( FBitSet( m_spawnflags, SF_LIGHT_START_OFF ) ) { TurnOn(); } else { TurnOff(); } }
void CFuncWallToggle::InputToggle( inputdata_t &inputdata ) { int status = IsOn(); if ( ShouldToggle( USE_TOGGLE, status ) ) { if ( status ) TurnOff(); else TurnOn(); } }
void CFuncWallDetail :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { int status = IsOn(); if ( ShouldToggle( useType, status ) ) { if ( status ) TurnOff(); else TurnOn(); } }
void CFuncWallToggle :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { // int status = IsOn(); BOOL status = (GetState() == STATE_ON); if ( ShouldToggle( useType, status ) ) { if ( status ) TurnOff(); else TurnOn(); } }
void Camera::InitialUpdate(int nInfo) { if (nInfo == INITIALUPDATE_SAVEGAME) return; if (m_bStartActive) { TurnOn(); } // Tell the clients about us... CreateSFXMsg(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CLogicNavigation::Activate() { BaseClass::Activate(); if ( HasSpawnFlags( SF_NAV_START_ON ) ) { TurnOn(); RemoveSpawnFlags( SF_NAV_START_ON ); } else if ( m_isOn ) { gEntList.AddListenerEntity( this ); } }
void ProcessCommand() { if(Control == OFF) { TurnOff(); } else { TurnOn(); } // //gui lenh xac nhan len node Zigbee thong qua module UART // ConfirmToZigbeeNode(Command); }
void CLaser::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { int active = IsOn(); if(!ShouldToggle(useType, active)) return; if(active) { TurnOff(); } else { TurnOn(); } }
// DVS TODO: Obsolete Use handler void CSprite::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { int on = !IsEffectActive( EF_NODRAW ); if ( ShouldToggle( useType, on ) ) { if ( on ) { TurnOff(); } else { TurnOn(); } } }