16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 00:59:18 +02:00
This commit is contained in:
milek7
2019-01-13 14:19:21 +01:00
parent 3db9efd3f7
commit cb106fb135
17 changed files with 82 additions and 66 deletions

View File

@@ -226,6 +226,7 @@ commanddescription_sequence Commands_descriptions = {
{ "vehiclemoveforwards", command_target::vehicle, command_mode::oneoff },
{ "vehiclemovebackwards", command_target::vehicle, command_mode::oneoff },
{ "vehicleboost", command_target::vehicle, command_mode::oneoff },
{ "debugtoggle", command_target::simulation, command_mode::oneoff },
};
} // simulation
@@ -238,7 +239,7 @@ void command_queue::update()
double delta = Timer::GetDeltaTime();
for (auto c : m_active_continuous)
{
command_data data({c.first, GLFW_REPEAT, 0.0, 0.0, delta});
command_data data({c.first, GLFW_REPEAT, 0.0, 0.0, delta, false, glm::vec3()}); // todo: improve
auto lookup = m_commands.emplace( c.second, commanddata_sequence() );
// recipient stack was either located or created, so we can add to it quite safely
lookup.first->second.emplace_back( data );
@@ -365,7 +366,7 @@ command_relay::post( user_command const Command, double const Param1, double con
}
uint32_t combined_recipient = static_cast<uint32_t>( command.target ) | Recipient;
command_data commanddata({Command, Action, Param1, Param2, Timer::GetDeltaTime() });
command_data commanddata({Command, Action, Param1, Param2, Timer::GetDeltaTime(), FreeFlyModeFlag, Global.pCamera.Pos });
simulation::Commands->push(commanddata, combined_recipient);
}