MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / DecreaseCurrentTriggerWeight

Method DecreaseCurrentTriggerWeight

src/Ext/Script/Body.cpp:511–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511void ScriptExt::DecreaseCurrentTriggerWeight(TeamClass* pTeam, bool forceJumpLine, double modifier)
512{
513 if (modifier <= 0)
514 modifier = pTeam->CurrentScript->Type->ScriptActions[pTeam->CurrentScript->CurrentMission].Argument;
515
516 if (modifier <= 0)
517 modifier = RulesClass::Instance->AITriggerFailureWeightDelta;
518 else
519 modifier = modifier * (-1);
520
521 ScriptExt::ModifyCurrentTriggerWeight(pTeam, forceJumpLine, modifier);
522
523 // This action finished
524 if (forceJumpLine)
525 pTeam->StepCompleted = true;
526
527 return;
528}
529
530void ScriptExt::IncreaseCurrentTriggerWeight(TeamClass* pTeam, bool forceJumpLine, double modifier)
531{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected