|
|
@ -35,12 +35,12 @@ void syndromeHandler(color_ostream& out, void* ptr) {
|
|
|
|
EventManager::SyndromeData* data = (EventManager::SyndromeData*)ptr;
|
|
|
|
EventManager::SyndromeData* data = (EventManager::SyndromeData*)ptr;
|
|
|
|
//out.print("Syndrome started: unit %d, syndrome %d.\n", data->unitId, data->syndromeIndex);
|
|
|
|
//out.print("Syndrome started: unit %d, syndrome %d.\n", data->unitId, data->syndromeIndex);
|
|
|
|
|
|
|
|
|
|
|
|
int32_t index = df::unit::binsearch_index(df::global::world->units.active, data->unitId);
|
|
|
|
df::unit* unit = df::unit::find(data->unitId);
|
|
|
|
if ( index < 0 ) {
|
|
|
|
if (!unit) {
|
|
|
|
out.print("%s, line %d: couldn't find unit.\n", __FILE__, __LINE__);
|
|
|
|
out.print("%s, line %d: couldn't find unit.\n", __FILE__, __LINE__);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
df::unit* unit = df::global::world->units.active[index];
|
|
|
|
|
|
|
|
df::unit_syndrome* unit_syndrome = unit->syndromes.active[data->syndromeIndex];
|
|
|
|
df::unit_syndrome* unit_syndrome = unit->syndromes.active[data->syndromeIndex];
|
|
|
|
df::syndrome* syndrome = df::global::world->raws.syndromes.all[unit_syndrome->type];
|
|
|
|
df::syndrome* syndrome = df::global::world->raws.syndromes.all[unit_syndrome->type];
|
|
|
|
|
|
|
|
|
|
|
|