Fix Lint broken by b662a4577d692329b9ca83525e6039f2ddcd1ac1
[oweals/minetest.git] / src / client.cpp
index 94c808a57823683e346fc4f09a951294c7335b59..43b58d819ccaf8f54c0fc0ff72596ae0da5389b9 100644 (file)
@@ -45,7 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "database-sqlite3.h"
 #include "serialization.h"
 #include "guiscalingfilter.h"
-#include "script/clientscripting.h"
+#include "script/scripting_client.h"
 #include "game.h"
 
 extern gui::IGUIEnvironment* guienv;
@@ -526,7 +526,6 @@ void Client::step(float dtime)
        if (m_media_downloader && m_media_downloader->isStarted()) {
                m_media_downloader->step(this);
                if (m_media_downloader->isDone()) {
-                       received_media();
                        delete m_media_downloader;
                        m_media_downloader = NULL;
                }
@@ -747,14 +746,6 @@ void Client::request_media(const std::vector<std::string> &file_requests)
                        << file_requests.size() << " files. packet size)" << std::endl;
 }
 
-void Client::received_media()
-{
-       NetworkPacket pkt(TOSERVER_RECEIVED_MEDIA, 0);
-       Send(&pkt);
-       infostream << "Client: Notifying server that we received all media"
-                       << std::endl;
-}
-
 void Client::initLocalMapSaving(const Address &address,
                const std::string &hostname,
                bool is_local_server)
@@ -1627,7 +1618,7 @@ float Client::mediaReceiveProgress()
 typedef struct TextureUpdateArgs {
        IrrlichtDevice *device;
        gui::IGUIEnvironment *guienv;
-       u32 last_time_ms;
+       u64 last_time_ms;
        u16 last_percent;
        const wchar_t* text_base;
        ITextureSource *tsrc;
@@ -1643,7 +1634,7 @@ void texture_update_progress(void *args, u32 progress, u32 max_progress)
                u32 time_ms = targs->last_time_ms;
                if (cur_percent != targs->last_percent) {
                        targs->last_percent = cur_percent;
-                       time_ms = getTimeMs();
+                       time_ms = porting::getTimeMs();
                        // only draw when the user will notice something:
                        do_draw = (time_ms - targs->last_time_ms > 100);
                }
@@ -1701,7 +1692,7 @@ void Client::afterContentReceived(IrrlichtDevice *device)
        TextureUpdateArgs tu_args;
        tu_args.device = device;
        tu_args.guienv = guienv;
-       tu_args.last_time_ms = getTimeMs();
+       tu_args.last_time_ms = porting::getTimeMs();
        tu_args.last_percent = 0;
        tu_args.text_base =  wgettext("Initializing nodes");
        tu_args.tsrc = m_tsrc;