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

Method Simulate

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

Source from the content-addressed store, hash-verified

694}
695
696void Detector::Simulate(float deltaT, SimulationImportance prec)
697{
698 if (_activeCountdown)
699 {
700 if (Glob.time >= _countdown)
701 {
702 OnActivate(GetActiveVehicle());
703 _activeCountdown = false;
704 }
705 }
706
707 Scan();
708
709 if (_dynSound)
710 {
711 _dynSound->Simulate(this, deltaT, prec);
712 }
713 if (_voice)
714 {
715 if (!_voice->Simulate(deltaT, prec))
716 {
717 _voice = nullptr;
718 }
719 }
720 if (_sound)
721 {
722 if (!_sound->Simulate(deltaT, prec))
723 {
724 _sound = nullptr;
725 }
726 }
727
728 base::Simulate(deltaT, prec);
729}
730
731bool Detector::TestSide(EntityAI* vehicle)
732{

Callers 1

FlagSimulateMethod · 0.45

Calls 3

GetDebugNameMethod · 0.45
IsLocalMethod · 0.45
SetFlagCarrierMethod · 0.45

Tested by

no test coverage detected