void ColdProtectionSpell::End() { ARX_SOUND_Stop(m_snd_loop); ARX_SOUND_PlaySFX(SND_SPELL_COLD_PROTECTION_END, &entities[m_target]->pos); m_targets.clear(); if(ValidIONum(m_target)) ARX_HALO_SetToNative(entities[m_target]); }
void ColdProtectionSpell::End() { ARX_SOUND_Stop(m_snd_loop); Entity * target = entities.get(m_target); if(target) { ARX_SOUND_PlaySFX(SND_SPELL_COLD_PROTECTION_END, &target->pos); ARX_HALO_SetToNative(target); } m_targets.clear(); }
Entity::Entity(const res::path & classPath, EntityInstance instance) : mainevent(SM_MAIN) , m_index(size_t(-1)) , m_id(classPath, instance) , m_classPath(classPath) { m_index = entities.add(this); ioflags = 0; lastpos = Vec3f_ZERO; pos = Vec3f_ZERO; move = Vec3f_ZERO; lastmove = Vec3f_ZERO; forcedmove = Vec3f_ZERO; angle = Anglef::ZERO; physics = IO_PHYSICS(); room = -1; requestRoomUpdate = true; original_height = 0.f; original_radius = 0.f; m_icon = NULL; obj = NULL; std::fill_n(anims, MAX_ANIMS, (ANIM_HANDLE *)NULL); for(size_t l = 0; l < MAX_ANIM_LAYERS; l++) { animlayer[l] = AnimLayer(); } animBlend.m_active = false; animBlend.lastanimtime = 0; std::memset(&bbox3D, 0, sizeof(EERIE_3D_BBOX)); // TODO use constructor bbox2D.min = Vec2f(-1.f, -1.f); bbox2D.max = Vec2f(-1.f, -1.f); tweaky = NULL; sound = audio::INVALID_ID; type_flags = 0; scriptload = 0; target = Vec3f_ZERO; targetinfo = EntityHandle(TARGET_NONE); _itemdata = NULL; _fixdata = NULL; _npcdata = NULL; _camdata = NULL; inventory = NULL; show = SHOW_FLAG_IN_SCENE; collision = 0; infracolor = Color3f::blue; changeanim = -1; weight = 1.f; gameFlags = GFLAG_NEEDINIT | GFLAG_INTERACTIVITY; fall = 0.f; initpos = Vec3f_ZERO; initangle = Anglef::ZERO; scale = 1.f; usepath = NULL; symboldraw = NULL; dynlight = LightHandle(); lastspeechflag = 2; inzone = NULL; halo = IO_HALO(); halo_native = IO_HALO(); halo_native.color = Color3f(0.2f, 0.5f, 1.f); halo_native.radius = 45.f; halo_native.flags = 0; ARX_HALO_SetToNative(this); for(size_t j = 0; j < MAX_SCRIPTTIMERS; j++) { m_scriptTimers[j] = 0; } m_disabledEvents = 0; stat_count = 0; stat_sent = 0; tweakerinfo = NULL; material = MATERIAL_NONE; m_inventorySize = Vec2s(1, 1); soundtime = 0; soundcount = 0; sfx_time = 0; collide_door_time = 0; ouch_time = 0; dmg_sum = 0.f; spellcast_data = IO_SPELLCAST_DATA(); flarecount = 0; no_collide = EntityHandle(); invisibility = 0.f; basespeed = 1.f; speed_modif = 0.f; rubber = BASE_RUBBER; max_durability = durability = 100.f; poisonous = 0; poisonous_count = 0; ignition = 0.f; ignit_light = LightHandle(); ignit_sound = audio::INVALID_ID; head_rot = 0.f; damager_damages = 0; damager_type = 0; sfx_flag = 0; secretvalue = -1; shop_multiply = 1.f; isHit = false; inzone_show = 0; summoner = EntityHandle(); spark_n_blood = 0; special_color = Color3f::white; highlightColor = Color3f::black; }
Entity::Entity(const res::path & classPath) : m_index(size_t(-1)), m_classPath(classPath) { m_index = entities.add(this); ioflags = 0; lastpos = Vec3f_ZERO; pos = Vec3f_ZERO; move = Vec3f_ZERO; lastmove = Vec3f_ZERO; forcedmove = Vec3f_ZERO; angle = Anglef::ZERO; std::memset(&physics, 0, sizeof(IO_PHYSICS)); // TODO use constructor room = -1; room_flags = 1; original_height = 0.f; original_radius = 0.f; inv = NULL; obj = NULL; std::fill_n(anims, MAX_ANIMS, (ANIM_HANDLE *)NULL); std::memset(animlayer, 0, sizeof(ANIM_USE) * MAX_ANIM_LAYERS); // TODO use constructor animBlend.nb_lastanimvertex = 0; animBlend.lastanimtime = 0; std::memset(&bbox3D, 0, sizeof(EERIE_3D_BBOX)); // TODO use constructor bbox2D.min = Vec2f(-1.f, -1.f); bbox2D.max = Vec2f(-1.f, -1.f); tweaky = NULL; sound = audio::INVALID_ID; type_flags = 0; scriptload = 0; target = Vec3f_ZERO; targetinfo = TARGET_NONE; _itemdata = NULL, _fixdata = NULL, _npcdata = NULL, _camdata = NULL; inventory = NULL; show = SHOW_FLAG_IN_SCENE; collision = 0; infracolor = Color3f::blue; changeanim = -1; ident = 0; weight = 1.f; gameFlags = GFLAG_NEEDINIT | GFLAG_INTERACTIVITY; velocity = Vec3f_ZERO; fall = 0.f; stopped = 1; initpos = Vec3f_ZERO; initangle = Anglef::ZERO; scale = 1.f; usepath = NULL; symboldraw = NULL; dynlight = -1; lastspeechflag = 2; inzone = NULL; std::memset(&halo, 0, sizeof(IO_HALO)); // TODO use constructor std::memset(&halo_native, 0, sizeof(IO_HALO)); // TODO use constructor halo_native.color = Color3f(0.2f, 0.5f, 1.f); halo_native.radius = 45.f; halo_native.flags = 0; halo_native.dynlight = -1; ARX_HALO_SetToNative(this); halo.dynlight = -1; std::memset(&script, 0, sizeof(EERIE_SCRIPT)); // TODO use constructor std::memset(&over_script, 0, sizeof(EERIE_SCRIPT)); // TODO use constructor stat_count = 0; stat_sent = 0; tweakerinfo = NULL; material = MATERIAL_NONE; sizex = 1; sizey = 1; soundtime = 0; soundcount = 0; sfx_time = 0; collide_door_time = 0; ouch_time = 0; dmg_sum = 0.f; std::memset(&spellcast_data, 0, sizeof(IO_SPELLCAST_DATA)); flarecount = 0; no_collide = -1; invisibility = 0.f; basespeed = 1.f; speed_modif = 0.f; spells_on = NULL; nb_spells_on = 0; damagedata = -1; rubber = BASE_RUBBER; max_durability = durability = 100.f; poisonous = 0; poisonous_count = 0; ignition = 0.f; ignit_light = -1; ignit_sound = audio::INVALID_ID; head_rot = 0.f; damager_damages = 0; damager_type = 0; sfx_flag = 0; secretvalue = -1; shop_multiply = 1.f; isHit = false; inzone_show = 0; summoner = 0; spark_n_blood = 0; special_color = Color3f::white; highlightColor = Color3f::black; ARX_SCRIPT_SetMainEvent(this, "main"); }