MCPcopy Create free account
hub / github.com/DFHack/dfhack / proposeUnitHits

Function proposeUnitHits

plugins/siege-engine.cpp:1356–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1354}
1355
1356static void proposeUnitHits(EngineInfo *engine, std::vector<UnitPath::Hit> *hits, float bias)
1357{
1358 auto &active = world->units.active;
1359
1360 for (size_t i = 0; i < active.size(); i++)
1361 {
1362 auto unit = active[i];
1363
1364 if (!canTargetUnit(unit))
1365 continue;
1366
1367 UnitPath::get(unit)->findHits(engine, hits, bias);
1368 }
1369}
1370
1371static int proposeUnitHits(lua_State *L)
1372{

Callers

nothing calls this directly

Calls 13

canTargetUnitFunction · 0.85
find_engineFunction · 0.85
luaL_optnumberFunction · 0.85
luaL_errorFunction · 0.85
lua_createtableFunction · 0.85
SetFieldFunction · 0.85
push_marginFunction · 0.85
lua_setfieldFunction · 0.85
lua_rawsetiFunction · 0.85
findHitsMethod · 0.80
hasTargetMethod · 0.80
getFunction · 0.70

Tested by

no test coverage detected