mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
map rendering improvements
This commit is contained in:
@@ -535,4 +535,9 @@ void TSegment::render_lines(std::vector<gfx::basic_vertex> &out, float quality)
|
||||
previous = glm::vec3(FastGetPoint(x));
|
||||
out.push_back(gfx::basic_vertex(previous, glm::vec3(0.0f), glm::vec2(0.0f)));
|
||||
}
|
||||
|
||||
out.push_back(gfx::basic_vertex(previous, glm::vec3(0.0f), glm::vec2(0.0f)));
|
||||
|
||||
previous = glm::vec3(FastGetPoint(1.0));
|
||||
out.push_back(gfx::basic_vertex(previous, glm::vec3(0.0f), glm::vec2(0.0f)));
|
||||
}
|
||||
|
||||
@@ -1137,12 +1137,12 @@ void TTrack::create_map_geometry(std::vector<gfx::basic_vertex> &Bank)
|
||||
{
|
||||
case tt_Normal:
|
||||
case tt_Table:
|
||||
Segment->render_lines(Bank, 1.0f);
|
||||
Segment->render_lines(Bank, 0.5f);
|
||||
break;
|
||||
case tt_Switch:
|
||||
case tt_Cross:
|
||||
SwitchExtension->Segments[0]->render_lines(Bank, 1.0f);
|
||||
SwitchExtension->Segments[1]->render_lines(Bank, 1.0f);
|
||||
SwitchExtension->Segments[0]->render_lines(Bank, 0.5f);
|
||||
SwitchExtension->Segments[1]->render_lines(Bank, 0.5f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
2
lua.cpp
2
lua.cpp
@@ -32,7 +32,7 @@ lua::~lua()
|
||||
void lua::interpret(std::string file)
|
||||
{
|
||||
if (luaL_dofile(state, file.c_str())) {
|
||||
char *str = lua_tostring(state, -1);
|
||||
const char *str = lua_tostring(state, -1);
|
||||
ErrorLog(std::string(str), logtype::lua);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ void ui::map_panel::render_contents()
|
||||
glm::vec2 ndc_pos = surface_pos / surface_size * 2.0f - 1.0f;
|
||||
glm::vec3 world_pos = glm::inverse(transform) * glm::vec4(ndc_pos.x, 0.0f, -ndc_pos.y, 1.0f);
|
||||
|
||||
std::vector<TEventLauncher *> launchers = simulation::Events.find_eventlaunchers(glm::vec2(world_pos.x, world_pos.z), 0.01f / zoom);
|
||||
std::vector<TEventLauncher *> launchers = simulation::Events.find_eventlaunchers(glm::vec2(world_pos.x, world_pos.z), 15.0f);
|
||||
|
||||
for (auto launcher : launchers) {
|
||||
command_relay relay;
|
||||
|
||||
Reference in New Issue
Block a user