MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / CreateCondition

Function CreateCondition

engine/Poseidon/UI/Map/UIMapExtDisplay.cpp:1399–1409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1397 }
1398}
1399
1400RString CreateCondition(RString presenceCondition, float presence)
1401{
1402 if (presence < 1)
1403 {
1404 if (strcmp(presenceCondition, "true") == 0)
1405 return Format("%g > random 1", presence);
1406 return Format("(%s) and (%g > random 1)", (const char*)presenceCondition, presence);
1407 }
1408 else
1409 return presenceCondition;
1410}
1411
1412static RString WriteVehicle(QOStream& out, const ArcadeUnitInfo& unit, EditorObjectType& typeSoundSource,

Callers 2

WriteVehicleFunction · 0.85
WriteUnitFunction · 0.85

Calls 1

FormatFunction · 0.50

Tested by

no test coverage detected