Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
CharacterFactory.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 2013-2018 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
24#include "Application.h"
25
26#include "Character.h"
27#include "Network.h"
28
29#include <memory>
30
31namespace RoR {
32
35
38
40{
41public:
47 void Update(float dt);
48#ifdef USE_SOCKETW
49 void handleStreamData(std::vector<RoR::NetRecvPacket> packet);
50#endif // USE_SOCKETW
51
52private:
53
54 std::unique_ptr<Character> m_local_character;
55 std::vector<std::unique_ptr<Character>> m_remote_characters;
56
57 void createRemoteInstance(int sourceid, int streamid);
58 void removeStreamSource(int sourceid);
59};
60
63
64} // namespace RoR
Central state/object manager and communications hub.
Character * CreateLocalCharacter()
void createRemoteInstance(int sourceid, int streamid)
void handleStreamData(std::vector< RoR::NetRecvPacket > packet)
void UndoRemoteActorCoupling(ActorPtr actor)
void removeStreamSource(int sourceid)
Character * GetLocalCharacter()
std::unique_ptr< Character > m_local_character
std::vector< std::unique_ptr< Character > > m_remote_characters