Experiments
This commit is contained in:
parent
230c6bdc1c
commit
2b5a171668
@ -238,11 +238,11 @@ namespace Assets
|
|||||||
if (asset->framecount > 0xFF)
|
if (asset->framecount > 0xFF)
|
||||||
{
|
{
|
||||||
buffer->Align(Utils::Stream::ALIGN_2);
|
buffer->Align(Utils::Stream::ALIGN_2);
|
||||||
buffer->SaveArray(dest->indices._2, asset->framecount);
|
buffer->SaveArray(asset->indices._2, asset->indexcount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
buffer->SaveArray(dest->indices._1, asset->framecount);
|
buffer->SaveArray(asset->indices._1, asset->indexcount);
|
||||||
}
|
}
|
||||||
|
|
||||||
dest->indices.data = reinterpret_cast<void*>(-1);
|
dest->indices.data = reinterpret_cast<void*>(-1);
|
||||||
|
@ -157,30 +157,28 @@ namespace Components
|
|||||||
|
|
||||||
http_message* message = reinterpret_cast<http_message*>(ev_data);
|
http_message* message = reinterpret_cast<http_message*>(ev_data);
|
||||||
|
|
||||||
if (std::string(message->uri.p, message->uri.len) == "/")
|
// if (std::string(message->uri.p, message->uri.len) == "/")
|
||||||
|
// {
|
||||||
|
// mg_printf(nc,
|
||||||
|
// "HTTP/1.1 200 OK\r\n"
|
||||||
|
// "Content-Type: text/html\r\n"
|
||||||
|
// "Connection: close\r\n"
|
||||||
|
// "\r\n"
|
||||||
|
// "Hi fella!<br>You are%s connected to this server!", (Download::IsClient(nc) ? " " : " not"));
|
||||||
|
//
|
||||||
|
// Game::client_t* client = Download::GetClient(nc);
|
||||||
|
//
|
||||||
|
// if (client)
|
||||||
|
// {
|
||||||
|
// mg_printf(nc, "<br>Hello %s!", client->name);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else
|
||||||
{
|
{
|
||||||
mg_printf(nc,
|
std::string path = (Dvar::Var("fs_basepath").Get<std::string>() + "\\" BASEGAME "\\html");
|
||||||
"HTTP/1.1 200 OK\r\n"
|
mg_serve_http_opts opts = { 0 };
|
||||||
"Content-Type: text/html\r\n"
|
opts.document_root = path.data();
|
||||||
"Connection: close\r\n"
|
mg_serve_http(nc, message, opts);
|
||||||
"\r\n"
|
|
||||||
"Hi fella!<br>You are%s connected to this server!", (Download::IsClient(nc) ? " " : " not"));
|
|
||||||
|
|
||||||
Game::client_t* client = Download::GetClient(nc);
|
|
||||||
|
|
||||||
if (client)
|
|
||||||
{
|
|
||||||
mg_printf(nc, "<br>Hello %s!", client->name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mg_printf(nc, "%s",
|
|
||||||
"HTTP/1.1 404 Not Found\r\n"
|
|
||||||
"Content-Type: text/html\r\n"
|
|
||||||
"Connection: close\r\n"
|
|
||||||
"\r\n"
|
|
||||||
"404 - Not Found");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nc->flags |= MG_F_SEND_AND_CLOSE;
|
nc->flags |= MG_F_SEND_AND_CLOSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user