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

Method Detector

engine/Poseidon/World/Detection/Detector.cpp:42–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40DEFINE_CASTING(Detector)
41
42Detector::Detector(EntityType* name, int id) : Vehicle(name->GetShape(), name, id)
43{
44 const float prec = 0.5;
45 _simulationSkipped = GRandGen.RandomValue() * prec;
46 SetSimulationPrecision(prec);
47 SetType(TypeVehicle);
48
49 _a = 50;
50 _b = 50;
51 _e = 0;
52 _sinAngle = 0;
53 _cosAngle = 1;
54 _rectangular = false;
55
56 _activationBy = ASANone;
57 _activationType = ASATPresent;
58 _repeating = true;
59 _timeoutMin = 0;
60 _timeoutMid = 0;
61 _timeoutMax = 0;
62 _interruptable = false;
63
64 _action = ASTNone;
65
66 _text = "";
67
68 _expCond = "this";
69 _expActiv = "";
70 _expDesactiv = "";
71
72 _assignedStatic = -1;
73 _assignedVehicle = -1;
74
75 _effects.Init();
76
77 _nextCheck = Glob.time + 2 + GRandGen.RandomValue() * 2;
78 _active = false;
79 _activeCountdown = false;
80
81 _vehicles = new GameValue();
82}
83
84Detector::~Detector() = default;
85

Callers

nothing calls this directly

Calls 4

SetTypeFunction · 0.85
GetShapeMethod · 0.45
RandomValueMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected