这篇教程C++ IsInWorld函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中IsInWorld函数的典型用法代码示例。如果您正苦于以下问题:C++ IsInWorld函数的具体用法?C++ IsInWorld怎么用?C++ IsInWorld使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了IsInWorld函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DangerSoundThinkvoid CGrenade::DangerSoundThink( void ){ if (!IsInWorld()) { UTIL_Remove( this ); return; } CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin + pev->velocity * 0.5, pev->velocity.Length( ), 0.2 ); pev->nextthink = gpGlobals->time + 0.2; if (pev->waterlevel != 0) { pev->velocity = pev->velocity * 0.5; }}
开发者ID:Arkshine,项目名称:NS,代码行数:16,
示例2: ASSERTvoid TempSummon::UnSummon(){ //ASSERT(!isPet()); if (isPet()) { ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:Bootz,项目名称:S6.RO.WoW,代码行数:16,
示例3: SendChatMessagevoid Player::SendChatMessage(const char *format, ...){ if (!IsInWorld()) return; if (format) { va_list ap; char str [2048]; va_start(ap, format); vsnprintf(str, 2048, format, ap); va_end(ap); ChatHandler(GetSession()).SendSysMessage(str); }}
开发者ID:Brayna01222,项目名称:Core-Trinity,代码行数:16,
示例4: RemoveFromWorldvoid TempSummon::RemoveFromWorld(){ if (!IsInWorld()) return; if (m_Properties) if (uint32 slot = m_Properties->Slot) if (Unit* owner = GetSummoner()) if (owner->m_SummonSlot[slot] == GetGUID()) owner->m_SummonSlot[slot] = 0; //if (GetOwnerGUID()) // sLog.outError("Unit %u has owner guid when removed from world", GetEntry()); Creature::RemoveFromWorld();}
开发者ID:Bootz,项目名称:S6.RO.WoW,代码行数:16,
示例5: AddPassengervoid Transport::AddPassenger(WorldObject* passenger){ if (!IsInWorld()) return; if (_passengers.insert(passenger).second) { passenger->SetTransport(this); passenger->m_movementInfo.AddMovementFlag(MOVEMENTFLAG_ONTRANSPORT); passenger->m_movementInfo.transport.guid = GetGUID(); TC_LOG_DEBUG("entities.transport", "Object %s boarded transport %s.", passenger->GetName().c_str(), GetName().c_str()); if (Player* plr = passenger->ToPlayer()) sScriptMgr->OnAddPassenger(this, plr); }}
开发者ID:deathkayn,项目名称:Core-W,代码行数:16,
示例6: DestroyForPlayervoid Item::RemoveFromWorld(){ // if we have an owner->send destroy if( m_owner != NULL ) { DestroyForPlayer( m_owner ); } if( !IsInWorld() ) return; m_mapMgr->RemoveObject( TO_OBJECT(this), false ); m_mapMgr = NULLMAPMGR; // update our event holder event_Relocate();}
开发者ID:WowDevs,项目名称:Sandshroud,代码行数:17,
示例7: SetFlagVisiblevoid Player::Reputation_OnTalk(FactionDBC * dbc){ // set faction visible if not visible if(!dbc || dbc->RepListId < 0) return; FactionReputation * rep = reputationByListId[dbc->RepListId]; if(!rep) return; if(!Visible(rep->flag)) { SetFlagVisible(rep->flag); if(IsInWorld()) m_session->OutPacket(SMSG_SET_FACTION_VISIBLE, 4, &dbc->RepListId); }}
开发者ID:Sandshroud,项目名称:Sandshroud-Prodigy,代码行数:17,
示例8: DestroyForPlayervoid Item::RemoveFromWorld(){ // if we have an owner->send destroy if( m_owner != NULL ) { DestroyForPlayer( m_owner ); } if( !IsInWorld() ) return; mSemaphoreTeleport = true; m_mapMgr->RemoveObject( this, false ); m_mapMgr = NULL; // update our event holder event_Relocate();}
开发者ID:AegisEmu,项目名称:AegisEmu,代码行数:18,
示例9: DangerSoundThinkvoid CGrenade::DangerSoundThink( void ){ if( !IsInWorld( )) { UTIL_Remove( this ); return; } CSoundEnt::InsertSound( bits_SOUND_DANGER, GetAbsOrigin() + GetAbsVelocity() * 0.5, GetAbsVelocity().Length( ), 0.2 ); pev->nextthink = gpGlobals->time + 0.2; if( pev->waterlevel != 0 ) { Vector vecVelocity = GetAbsVelocity(); vecVelocity *= 0.5f; SetAbsVelocity( vecVelocity ); }}
开发者ID:FWGS,项目名称:XashXT,代码行数:18,
示例10: Despawnvoid Vehicle::Despawn(uint32 delay, uint32 respawntime){ if(delay) { sEventMgr.AddEvent(TO_VEHICLE(this), &Vehicle::Despawn, (uint32)0, respawntime, EVENT_VEHICLE_RESPAWN, delay, 1,0); return; } if(!IsInWorld()) return; if(respawntime) { for(int i = 0; i < 8; i++) { if(m_passengers[i] != NULL) { if(m_passengers[i]->IsPlayer()) // Remove any passengers RemovePassenger(m_passengers[i]); else m_passengers[i]->Destruct(); } } /* get the cell with our SPAWN location. if we've moved cell this might break :P */ MapCell * pCell = m_mapMgr->GetCellByCoords(m_spawnLocation.x, m_spawnLocation.y); if(!pCell) pCell = m_mapCell; ASSERT(pCell); pCell->_respawnObjects.insert(TO_OBJECT(this)); sEventMgr.RemoveEvents(this); sEventMgr.AddEvent(m_mapMgr, &MapMgr::EventRespawnVehicle, TO_VEHICLE(this), pCell, EVENT_VEHICLE_RESPAWN, respawntime, 1, 0); Unit::RemoveFromWorld(false); m_position = m_spawnLocation; m_respawnCell=pCell; } else { Unit::RemoveFromWorld(true); SafeDelete(); }}
开发者ID:SkyFire,项目名称:sandshroud,代码行数:44,
示例11: ASSERTvoid TempSummon::UnSummon(){ //ASSERT(!isPet()); if (isPet()) { if (((Pet*)this)->getPetType() == HUNTER_PET) ((Pet*)this)->Remove(PET_SLOT_ACTUAL_PET_SLOT); else ((Pet*)this)->Remove(PET_SLOT_OTHER_PET); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:kmishima,项目名称:DarkCore,代码行数:19,
示例12: Reputation_OnTalkvoid Player::Reputation_OnTalk(FactionDBC* dbc){ // set faction visible if not visible if(dbc == NULL || dbc->RepListId < 0) return; FactionReputation* rep = reputationByListId[dbc->RepListId]; if(rep == NULL) return; if(SetFlagVisible(rep->flag, true) && IsInWorld()) { m_session->OutPacket(SMSG_SET_FACTION_VISIBLE, 4, &dbc->RepListId);#ifdef OPTIMIZED_PLAYER_SAVING save_Reputation();#endif }}
开发者ID:Selenah,项目名称:ArcEmu,代码行数:19,
示例13: RemoveFromWorldvoid TempSummon::RemoveFromWorld(){ if (!IsInWorld()) return; if (m_Properties) { int32 slot = m_Properties->Slot; if (slot > 0) if (Unit* owner = GetSummoner()) if (owner->m_SummonSlot[slot] == GetGUID()) owner->m_SummonSlot[slot] = 0; } //if (GetOwnerGUID()) // TC_LOG_ERROR("entities.unit", "Unit %u has owner guid when removed from world", GetEntry()); Creature::RemoveFromWorld();}
开发者ID:oMadMano,项目名称:MistyWorld_6xx,代码行数:19,
示例14: whilevoid DynamicObject::Remove(){ // remove aura from all targets DynamicObjectList::iterator jtr = targets.begin(); DynamicObjectList::iterator jend = targets.end(); Unit * target; while(jtr != jend) { target = GetMapMgr() ? GetMapMgr()->GetUnit(*jtr) : NULL; ++jtr; if (target != NULL) target->RemoveAura(m_spellProto->Id); } if(IsInWorld()) RemoveFromWorld(true); delete this;}
开发者ID:Chero,项目名称:abcwow,代码行数:19,
示例15: RemoveFromWorldvoid AreaTrigger::RemoveFromWorld(){ ///- Remove the AreaTrigger from the accessor and from all lists of objects in world if (IsInWorld()) { _isRemoved = true; if (Unit* caster = GetCaster()) caster->_UnregisterAreaTrigger(this); // Handle removal of all units, calling OnUnitExit & deleting auras if needed HandleUnitEnterExit({}); _ai->OnRemove(); WorldObject::RemoveFromWorld(); GetMap()->GetObjectsStore().Remove<AreaTrigger>(GetGUID()); }}
开发者ID:Rochet2,项目名称:TrinityCore,代码行数:19,
示例16: WaitTillLandvoid CGib::WaitTillLand(){ if (!IsInWorld()) { UTIL_Remove(this); return; } if (pev->velocity == g_vecZero) { SetThink(&CBaseEntity::SUB_StartFadeOut); pev->nextthink = gpGlobals->time + m_lifeTime;#ifndef REGAMEDLL_FIXES if (m_bloodColor != DONT_BLEED) CSoundEnt::InsertSound(bits_SOUND_MEAT, pev->origin, 384, 25);#endif } else pev->nextthink = gpGlobals->time + 0.5f;}
开发者ID:a1batross,项目名称:ReGameDLL_CS,代码行数:20,
示例17: FragThinkvoid CGrenade :: FragThink( void ){ if (!IsInWorld()) { UTIL_Remove( this ); return; } StudioFrameAdvance( ); pev->nextthink = gpGlobals->time + 0.1; CSoundEnt::InsertSound ( bits_SOUND_DANGER, pev->origin + pev->velocity * (pev->dmgtime - gpGlobals->time), 400, 0.1 ); if (pev->waterlevel != 0) { pev->velocity = pev->velocity * 0.5; pev->framerate = 0.2; }}
开发者ID:jlecorre,项目名称:hlinvasion,代码行数:20,
示例18: shared_from_thisvoid Item::Destructor(){ sEventMgr.RemoveEvents( shared_from_this() ); EnchantmentMap::iterator itr; for( itr = Enchantments.begin(); itr != Enchantments.end(); ++itr ) { if( itr->second.Enchantment->type == 0 && itr->second.Slot == 0 && itr->second.ApplyTime == 0 && itr->second.Duration == 0 ) { delete itr->second.Enchantment; itr->second.Enchantment = NULL; } } if( IsInWorld() ) RemoveFromWorld(); m_owner = NULLPLR; Object::Destructor();}
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:20,
示例19: Spellvoid Pet::AddSpell(SpellEntry * sp){ // Cast on self if we're a passive spell if(sp->Attributes & 64) { Spell * spell = new Spell(this, sp, true, false); SpellCastTargets targets(this->GetGUID()); spell->prepare(&targets); mSpells[sp] = 0x0100; } else { mSpells[sp] = DEFAULT_SPELL_STATE; // Create the AI_Spell CreateAISpell(sp); } if(IsInWorld()) SendSpellsToOwner();}
开发者ID:AwkwardDev,项目名称:WoWD,代码行数:20,
示例20: RemoveFromWorldvoid DynamicObject::RemoveFromWorld(){ // Remove the dynamicObject from the accessor if (IsInWorld()) { if (m_isWorldObject) { if (Unit *caster = GetCaster()) { if (caster->GetTypeId() == TYPEID_PLAYER) ((Player*)caster)->SetViewpoint(this, false); } else { sLog->outCrash("DynamicObject::RemoveFromWorld cannot find viewpoint owner"); } } WorldObject::RemoveFromWorld(); sObjectAccessor->RemoveObject(this); }}
开发者ID:Caydan,项目名称:TBCPvP,代码行数:21,
示例21: TumbleThinkvoid CMGrenade :: TumbleThink( void ){ if (!IsInWorld()) { UTIL_Remove( this->edict() ); return; } StudioFrameAdvance( ); pev->nextthink = gpGlobals->time + 0.1; if (pev->dmgtime <= gpGlobals->time) { SetThink( Detonate ); } if (pev->waterlevel != 0) { pev->velocity = pev->velocity * 0.5; pev->framerate = 0.2; }}
开发者ID:ET-NiK,项目名称:amxxgroup,代码行数:21,
示例22: ASSERTvoid AreaTrigger::InitCircularMovement(AreaTriggerCircularMovementInfo const& cmi, uint32 timeToTarget){ // Circular movement requires either a center position or an attached unit ASSERT(cmi.Center.is_initialized() || cmi.PathTarget.is_initialized()); // should be sent in object create packets only m_uint32Values[AREATRIGGER_TIME_TO_TARGET] = timeToTarget; _circularMovementInfo = cmi; _circularMovementInfo->TimeToTarget = timeToTarget; _circularMovementInfo->ElapsedTimeForMovement = 0; if (IsInWorld()) { WorldPackets::AreaTrigger::AreaTriggerRePath reshape; reshape.TriggerGUID = GetGUID(); reshape.AreaTriggerCircularMovement = _circularMovementInfo; SendMessageToSet(reshape.Write(), true); }}
开发者ID:Rochet2,项目名称:TrinityCore,代码行数:22,
示例23: ForcedUnsummonDelayEventvoid TempSummon::UnSummon(uint32 msTime) { if (msTime) { ForcedUnsummonDelayEvent *pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } //ASSERT(!isPet()); if (isPet()) { ((Pet*) this)->Remove(PET_SLOT_OTHER_PET); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); AddObjectToRemoveList();}
开发者ID:rexy,项目名称:ArkCORE,代码行数:22,
示例24: RemoveFromWorld void ActorRigid::RemoveFromWorld() { if( !IsInWorld() ) return; try{ Physics::PhysicsManager* PhysMan = Entresol::GetSingletonPtr()->GetPhysicsManager(); btSoftRigidDynamicsWorld* BWorld = PhysMan->_GetPhysicsWorldPointer(); BWorld->removeRigidBody(this->PhysicsRigidBody); DetachAllChildren(); }catch (...) { Entresol::GetSingletonPtr()->Log("Failed to locate PhysicsManager While Destructing ActorRigid. This is not a problem if already shutting down."); } //first remove any collision metadata /*if( !CurrentCollisions.empty() ) { PhysMan->RemoveCollisionsContainingActor(this); }// */ this->DetachFromGraphics(); }
开发者ID:zester,项目名称:Mezzanine,代码行数:22,
示例25: Removevoid AreaTrigger::Remove(){ if (IsInWorld()) { // TODO: Find a better place for this SpellInfo const* m_spellInfo = sSpellMgr->GetSpellInfo(GetUInt32Value(AREATRIGGER_FIELD_SPELL_ID)); if (!m_spellInfo) return; switch (m_spellInfo->Id) { case 116011: // Rune of Power : Remove the buff if caster is still in radius if (m_caster && m_caster->HasAura(116014)) m_caster->RemoveAura(116014); break; } SendObjectDeSpawnAnim(GetGUID()); RemoveFromWorld(); AddObjectToRemoveList(); }}
开发者ID:Caydan,项目名称:WoWSCore548,代码行数:22,
示例26: DetonateThink//-----------------------------------------------------------------------------// Purpose://-----------------------------------------------------------------------------void CTFWeaponBaseGrenadeProj::DetonateThink( void ){ if ( !IsInWorld() ) { Remove( ); return; } if ( gpGlobals->curtime > m_flCollideWithTeammatesTime && m_bCollideWithTeammates == false ) { m_bCollideWithTeammates = true; } if ( gpGlobals->curtime > m_flDetonateTime ) { Detonate(); return; } SetNextThink( gpGlobals->curtime + 0.2 );}
开发者ID:bmk10,项目名称:TF2Classic,代码行数:25,
注:本文中的IsInWorld函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ IsInitialized函数代码示例 C++ IsInUpdateQueue函数代码示例 |