/////////////////////////////////////////////////////////////////////// CSE_Abstract ///////////////////////////////////////////////////////////////////////
| 47 | // CSE_Abstract |
| 48 | //////////////////////////////////////////////////////////////////////////// |
| 49 | CSE_Abstract::CSE_Abstract(LPCSTR caSection) |
| 50 | { |
| 51 | m_editor_flags.zero(); |
| 52 | RespawnTime = 0; |
| 53 | net_Ready = FALSE; |
| 54 | ID = 0xffff; |
| 55 | ID_Parent = 0xffff; |
| 56 | ID_Phantom = 0xffff; |
| 57 | owner = 0; |
| 58 | s_gameid = 0; |
| 59 | s_RP = 0xFE; // Use supplied coords |
| 60 | s_flags.assign(0); |
| 61 | s_name = caSection; |
| 62 | s_name_replace = 0; // xr_strdup(""); |
| 63 | o_Angle.set(0.f, 0.f, 0.f); |
| 64 | o_Position.set(0.f, 0.f, 0.f); |
| 65 | m_bALifeControl = false; |
| 66 | m_wVersion = 0; |
| 67 | m_script_version = 0; |
| 68 | m_tClassID = TEXT2CLSID(pSettings->r_string(caSection, "class")); |
| 69 | |
| 70 | // m_spawn_probability = 1.f; |
| 71 | m_spawn_flags.zero(); |
| 72 | m_spawn_flags.set(flSpawnEnabled, TRUE); |
| 73 | m_spawn_flags.set(flSpawnOnSurgeOnly, TRUE); |
| 74 | m_spawn_flags.set(flSpawnSingleItemOnly, TRUE); |
| 75 | m_spawn_flags.set(flSpawnIfDestroyedOnly, TRUE); |
| 76 | m_spawn_flags.set(flSpawnInfiniteCount, TRUE); |
| 77 | // m_max_spawn_count = 1; |
| 78 | // m_spawn_control = ""; |
| 79 | // m_spawn_count = 0; |
| 80 | // m_last_spawn_time = 0; |
| 81 | // m_next_spawn_time = 0; |
| 82 | // m_min_spawn_interval = 0; |
| 83 | // m_max_spawn_interval = 0; |
| 84 | m_ini_file = 0; |
| 85 | |
| 86 | if (pSettings->line_exist(caSection, "custom_data")) |
| 87 | { |
| 88 | string_path file_name; |
| 89 | FS.update_path(file_name, "$game_config$", pSettings->r_string(caSection, "custom_data")); |
| 90 | if (!FS.exist(file_name)) |
| 91 | { |
| 92 | Msg("! cannot open config file %s", file_name); |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | IReader* reader = FS.r_open(file_name); |
| 97 | reader->skip_bom(file_name); |
| 98 | const xr_string temp{reinterpret_cast<const char*>(reader->pointer()), static_cast<size_t>(reader->elapsed())}; |
| 99 | m_ini_string = temp.c_str(); |
| 100 | FS.r_close(reader); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | m_script_clsid = object_factory().script_clsid(m_tClassID); |
| 105 | } |
| 106 |
nothing calls this directly
no test coverage detected