DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnStoreLoad()

bool PlayerAgentPool::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

См. определение в файле PlayerAgentPool.c строка 133

134 {
135 int count;
136 if (version >= 137)
137 {
138 count = m_PluginTransmissionAgents.GetAgentList().Count();
139 }
140 else
141 {
142 if (!ctx.Read(count))
143 return false;
144 }
145
146
147 for (int i = 0; i < count; ++i)
148 {
149 int agentId;
150 if (!ctx.Read(agentId))
151 return false;
152
153 int agentCount;
154 if (!ctx.Read(agentCount))
155 return false;
156
157 if (version >= 137)
158 {
159 float agentTemporaryResistanceTime;
160 if (!ctx.Read(agentTemporaryResistanceTime))
161 return false;
162
163 SetTemporaryResistance(agentId, agentTemporaryResistanceTime);
164 }
165
166 SetAgentCount(agentId, agentCount);
167 }
168
169 return true;
170 }
void SetTemporaryResistance(int agentId, float time)
Sets temporary resistance time against specified agent contraction.
Определения PlayerAgentPool.c:364
PluginTransmissionAgents m_PluginTransmissionAgents
Определения PlayerAgentPool.c:21
void SetAgentCount(int agent_id, float count)
Directly set the count of agents for give id in pool.
Определения PlayerAgentPool.c:297
proto bool Read(void value_in)

Перекрестные ссылки m_PluginTransmissionAgents, Serializer::Read(), SetAgentCount() и SetTemporaryResistance().