Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
26 lines
578 B
C++
26 lines
578 B
C++
#include "stdafx.h"
|
|
#include "AddLinkCommand.h"
|
|
#include <MW4\Rail_move.hpp>
|
|
|
|
using namespace MW4AI;
|
|
|
|
AddLinkCommand::AddLinkCommand(EditorLatticeNode* node)
|
|
{
|
|
node1 = node;
|
|
}
|
|
|
|
void AddLinkCommand::ConnectLink(EditorLatticeNode* node)
|
|
{
|
|
float weight[NUM_MOVE_TYPES][2];
|
|
|
|
node2 = node;
|
|
memset(&weight,0,sizeof(weight));
|
|
id = MW4AI::g_MissionGraph->AddLink(node1->railNode->ID(),node2->railNode->ID(),weight,MW4AI::twomax);
|
|
MW4AI::g_MissionGraph->Link(id)->ShowLink(true);
|
|
}
|
|
|
|
void AddLinkCommand::Undo()
|
|
{
|
|
MW4AI::g_MissionGraph->DeleteLink(id);
|
|
}
|