RigsofRods
Soft-body Physics Simulation
RepairMode.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2015-2020 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #pragma once
23 
26 
27 #include "Application.h"
28 
29 #include <vector>
30 
31 namespace RoR {
32 
35 
39 {
40 public:
41  void UpdateInputEvents(float dt);
42  bool IsLiveRepairActive() const { return m_live_repair_active; }
43  bool IsQuickRepairActive() const { return m_quick_repair_active; }
44  float GetLiveRepairTimer() const { return m_live_repair_timer; }
45 
46 private:
47  bool m_quick_repair_active = false; // Player is holding EV_COMMON_REPAIR_TRUCK
48  bool m_live_repair_active = false; // Player pressed EV_COMMON_LIVE_REPAIR_MODE or held QuickRepair for 'sim_live_repair_interval' seconds.
49  float m_live_repair_timer = 0.f;
50 };
51 
53 
54 } // namespace RoR
RoR::RepairMode::GetLiveRepairTimer
float GetLiveRepairTimer() const
Definition: RepairMode.h:44
RoR::RepairMode::IsLiveRepairActive
bool IsLiveRepairActive() const
Definition: RepairMode.h:42
RoR::RepairMode::IsQuickRepairActive
bool IsQuickRepairActive() const
Definition: RepairMode.h:43
RoR::RepairMode::m_quick_repair_active
bool m_quick_repair_active
Definition: RepairMode.h:47
RoR::RepairMode
Interactive recovery and repair mode, operates on player vehicle Formerly 'advanced repair' or 'inter...
Definition: RepairMode.h:38
Application.h
Central state/object manager and communications hub.
RoR::RepairMode::m_live_repair_timer
float m_live_repair_timer
Definition: RepairMode.h:49
RoR::RepairMode::UpdateInputEvents
void UpdateInputEvents(float dt)
Definition: RepairMode.cpp:30
RoR
Definition: AppContext.h:36
RoR::RepairMode::m_live_repair_active
bool m_live_repair_active
Definition: RepairMode.h:48