Browse Source

Merge branch 'master' of github.com:urho3d/Urho3D into p2p-multiplayer

Arnis Lielturks 6 years ago
parent
commit
31fb5dc07e

+ 5 - 0
CMake/Modules/UrhoCommon.cmake

@@ -730,6 +730,11 @@ else ()
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
         endif ()
+        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0.1 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0.1)
+            # Workaround for Clang 7.0.1 and above until the Bullet upstream has fixed the Clang 7 diagnostic checks issue (see https://github.com/bulletphysics/bullet3/issues/2114)
+            set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-argument-outside-range")
+            set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-argument-outside-range")
+        endif ()
     else ()
         # GCC-specific
         if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9.1)

+ 1 - 1
Docs/GettingStarted.dox

@@ -40,7 +40,7 @@ Although all required third-party libraries are included as source code, there a
 
 - For Raspberry Pi, follow the building prerequisite for Linux above, with the exception for display server. Raspberry Pi operating system usually already comes with Broadcom Video Core display server preinstalled. On top of that, you must also install this package: libevdev2 (Raspbian) or libevdev (Pidora).
 
-- For macOS, iOS, and tvOS, the Xcode developer tools package should include everything necessary. Make sure that the Xcode command line tools are also installed.
+- For macOS, iOS, and tvOS, the Xcode developer tools package should include everything necessary. Make sure that the Xcode command line tools are also installed. Homebrew is required to install 'cmake' and some of the optional development packages, such as ccache, doxygen, graphviz, and readline.
 
 - For Android, the Android Studio (version 3.1.3 or later) should include everything necessary. Make sure that Android SDK build tool (26.1.1 or later), SDK-bundled CMake (3.6.4111459 or later), and Android NDK (r17 or later) are also installed.
 

+ 5 - 0
Docs/Urho3D.dox

@@ -168,6 +168,7 @@ Urho3D development, contributions and bugfixes by:
 - TheComet93
 - Y-way
 - 1vanK
+- ab4daa
 - andmar1x
 - amadeus_osa
 - atship
@@ -182,6 +183,7 @@ Urho3D development, contributions and bugfixes by:
 - fredakilla
 - gleblebedev
 - hdunderscore
+- holyfight6
 - lhinuz
 - lvshiling
 - marynate
@@ -191,6 +193,7 @@ Urho3D development, contributions and bugfixes by:
 - nemerle
 - ninjastone
 - orefkov
+- pat2nav
 - proller
 - raould
 - rasteron
@@ -199,11 +202,13 @@ Urho3D development, contributions and bugfixes by:
 - rikorin
 - skaiware
 - ssinai1
+- sssooonnnggg
 - svifylabs
 - szamq
 - thebluefish
 - tommy3
 - yushli
+- zlum
 
 Urho3D is greatly inspired by OGRE (http://www.ogre3d.org/) and Horde3D (http://www.horde3d.org/). Additional inspiration & research used:
 

+ 5 - 0
README.md

@@ -122,6 +122,7 @@ Urho3D development, contributions and bugfixes by:
 - TheComet93
 - Y-way
 - 1vanK
+- ab4daa
 - andmar1x
 - amadeus_osa
 - atship
@@ -136,6 +137,7 @@ Urho3D development, contributions and bugfixes by:
 - fredakilla
 - gleblebedev
 - hdunderscore
+- holyfight6
 - hsnabn
 - lhinuz
 - lvshiling
@@ -146,6 +148,7 @@ Urho3D development, contributions and bugfixes by:
 - nemerle
 - ninjastone
 - orefkov
+- pat2nav
 - proller
 - raould
 - rasteron
@@ -154,11 +157,13 @@ Urho3D development, contributions and bugfixes by:
 - rikorin
 - skaiware
 - ssinai1
+- sssooonnnggg
 - svifylabs
 - szamq
 - thebluefish
 - tommy3
 - yushli
+- zlum
 
 Urho3D is greatly inspired by OGRE (http://www.ogre3d.org) and Horde3D
 (http://www.horde3d.org). Additional inspiration & research used:

+ 0 - 2
Rakefile

@@ -270,8 +270,6 @@ end
 desc 'Configure, build, and test Urho3D project'
 task :ci do
   next if timeup    # Measure the VM overhead
-  # Temporarily disable all build artifact uploads due to slow SF.net transfer rate
-  ENV['PACKAGE_UPLOAD'] = nil
   # Skip if only performing CI for selected branches and the current branch is not in the list
   unless ENV['RELEASE_TAG']
     next if ENV['TRAVIS'] && /\[skip travis\]/ =~ ENV['COMMIT_MESSAGE']   # For feature parity with AppVeyor's [skip appveyor]

+ 1 - 1
Source/ThirdParty/AngelScript/include/wrapmacros.h

@@ -75,7 +75,7 @@
 #define RegisterObjectMethodFasCALL_CDECL_OBJFIRST(clsdcl,decl,fun) RegisterObjectMethod(clsdcl,decl, WRAP_OBJ_FIRST(fun), asCALL_GENERIC); //assert(r >= 0);
 //#define RegisterObjectMethodMasCALL_CDECL_OBJECTFIRST(decl,cls,fun) RegisterObjectMethodMasCALL_THISCALL_ASGLOBAL_2(decl,UNWRAP fun)
 //#define RegisterObjectMethodMasCALL_THISCALL_ASGLOBAL_2(decl, ...) RegisterObjectMethod(decl, WRAP_MFN(__VA_ARGS__), asCALL_GENERIC); //assert(r >= 0);
-#define RegisterObjectMethodFasCALL_GENERIC(clsdcl,decl,fun) RegisterObjectMethod(clsdcl,decl, asMethodPtr(fun), asCALL_GENERIC); //assert(r >= 0);
+#define RegisterObjectMethodFasCALL_GENERIC(clsdcl,decl,fun) RegisterObjectMethod(clsdcl,decl, asFunctionPtr(fun), asCALL_GENERIC); //assert(r >= 0);
 
 ////note:unfortunately, the WrapCon methods are for creating the constructor wrapper, which typically seems to be done anyways, so we should just handle it like Register Object Method with 1 extra parameter
 //#define RegisterObjectBehaviour(...) RegObjectBehaviorIndirect(__VA__ARGS__)

+ 7 - 2
Source/ThirdParty/SLikeNet/Source/src/linux_adapter.cpp

@@ -1,4 +1,4 @@
-/*
+/*
  *  Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt)
  *
  *  This source code is licensed under the MIT-style license found in the
@@ -989,7 +989,12 @@ static void interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_links, stru
 		{
 			l_mask[i] = 0xff;
 		}
-		l_mask[i] = 0xff << (8 - (l_prefix % 8));
+
+		// Avoid stack check fail on android device, reference https://github.com/libuv/libuv/blob/e4087dedf837f415056a45a838f639a3d9dc3ced/src/unix/android-ifaddrs.c
+		if (l_prefix % 8)
+		{
+			l_mask[i] = 0xff << (8 - (l_prefix % 8));
+		}
 
 		makeSockaddr(l_entry->ifa_addr->sa_family, (struct sockaddr *)l_addr, l_mask, l_maxPrefix / 8);
 		l_entry->ifa_netmask = (struct sockaddr *)l_addr;

+ 2 - 2
Source/ThirdParty/toluapp/include/tolua++.h

@@ -139,13 +139,13 @@ static inline const char* tolua_tocppstring (lua_State* L, int narg, const char*
 
 	const char* s = tolua_tostring(L, narg, def);
 	return s?s:"";
-};
+}
 
 static inline const char* tolua_tofieldcppstring (lua_State* L, int lo, int index, const char* def) {
 
 	const char* s = tolua_tofieldstring(L, lo, index, def);
 	return s?s:"";
-};
+}
 
 #else
 #define tolua_tocppstring tolua_tostring

+ 2 - 1
Source/Urho3D/AngelScript/APITemplates.h

@@ -1244,7 +1244,8 @@ template <class T> void RegisterUIElement(asIScriptEngine* engine, const char* c
     engine->RegisterObjectMethod(className, "void set_focus(bool)", asMETHOD(T, SetFocus), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "bool get_focus() const", asMETHOD(T, HasFocus), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_selected(bool)", asMETHOD(T, SetSelected), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "bool get_selected() const", asMETHOD(T, IsSelected), asCALL_THISCALL);
+    // Need to explicitly bind to the base class's IsSelected() method because one of the subclasses has overloaded this method
+    engine->RegisterObjectMethod(className, "bool get_selected() const", asMETHOD(UIElement, IsSelected), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_visible(bool)", asMETHOD(T, SetVisible), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "bool get_visible() const", asMETHOD(T, IsVisible), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "bool get_visibleEffective() const", asMETHOD(T, IsVisibleEffective), asCALL_THISCALL);

+ 20 - 2
Source/Urho3D/AngelScript/Addons.cpp

@@ -2043,6 +2043,24 @@ void ScriptDictionaryListFactory_Generic(asIScriptGeneric *gen)
     *(CScriptDictionary**)gen->GetAddressOfReturnLocation() = CScriptDictionary::Create(buffer);
 }
 
+void ScriptDictionarySet_Generic(asIScriptGeneric *gen)
+{
+    CScriptDictionary* dict = (CScriptDictionary*)gen->GetObject();
+    String* key = *(String**)gen->GetAddressOfArg(0);
+    void* ref = *(void**)gen->GetAddressOfArg(1);
+    int type_id = gen->GetArgTypeId(1);
+    dict->Set(*key, ref, type_id);
+}
+
+void ScriptDictionaryGet_Generic(asIScriptGeneric *gen)
+{
+    CScriptDictionary* dict = (CScriptDictionary*)gen->GetObject();
+    String* key = *(String**)gen->GetAddressOfArg(0);
+    void* ref = *(void**)gen->GetAddressOfArg(1);
+    int type_id = gen->GetArgTypeId(1);
+    *(bool*)gen->GetAddressOfReturnLocation() = dict->Get(*key, ref, type_id);
+}
+
 CScriptDictValue::CScriptDictValue()    // NOLINT(hicpp-member-init)
 {
     m_valueObj = nullptr;
@@ -2273,8 +2291,8 @@ void RegisterDictionary(asIScriptEngine *engine)
     engine->RegisterObjectBehaviour("Dictionary", asBEHAVE_ADDREF, "void f()", asMETHOD(CScriptDictionary,AddRef), asCALL_THISCALL);
     engine->RegisterObjectBehaviour("Dictionary", asBEHAVE_RELEASE, "void f()", asMETHOD(CScriptDictionary,Release), asCALL_THISCALL);
     engine->RegisterObjectMethod("Dictionary", "Dictionary &opAssign(const Dictionary &in)", asMETHODPR(CScriptDictionary, operator=, (const CScriptDictionary &), CScriptDictionary&), asCALL_THISCALL);
-    engine->RegisterObjectMethod("Dictionary", "void Set(const String &in, const ?&in)", asMETHODPR(CScriptDictionary,Set,(const String&,void*,int),void), asCALL_THISCALL);
-    engine->RegisterObjectMethod("Dictionary", "bool Get(const String &in, ?&out) const", asMETHODPR(CScriptDictionary,Get,(const String&,void*,int) const,bool), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Dictionary", "void Set(const String &in, const ?&in)", asFUNCTION(ScriptDictionarySet_Generic), asCALL_GENERIC);
+    engine->RegisterObjectMethod("Dictionary", "bool Get(const String &in, ?&out) const", asFUNCTION(ScriptDictionaryGet_Generic), asCALL_GENERIC);
     engine->RegisterObjectMethod("Dictionary", "void Set(const String &in, const int64&in)", asMETHODPR(CScriptDictionary,Set,(const String&,const asINT64&),void), asCALL_THISCALL);
     engine->RegisterObjectMethod("Dictionary", "bool Get(const String &in, int64&out) const", asMETHODPR(CScriptDictionary,Get,(const String&,asINT64&) const,bool), asCALL_THISCALL);
     engine->RegisterObjectMethod("Dictionary", "void Set(const String &in, const double&in)", asMETHODPR(CScriptDictionary,Set,(const String&,const double&),void), asCALL_THISCALL);

+ 125 - 7
Source/Urho3D/AngelScript/ScriptFile.cpp

@@ -290,7 +290,7 @@ bool ScriptFile::HasEventHandler(Object* sender, StringHash eventType) const
         return false;
 }
 
-bool ScriptFile::Execute(const String& declaration, const VariantVector& parameters, bool unprepare)
+bool ScriptFile::Execute(const String& declaration, const VariantVector& parameters, Variant* functionReturn, bool unprepare)
 {
     asIScriptFunction* function = GetFunction(declaration);
     if (!function)
@@ -299,10 +299,10 @@ bool ScriptFile::Execute(const String& declaration, const VariantVector& paramet
         return false;
     }
 
-    return Execute(function, parameters, unprepare);
+    return Execute(function, parameters, functionReturn, unprepare);
 }
 
-bool ScriptFile::Execute(asIScriptFunction* function, const VariantVector& parameters, bool unprepare)
+bool ScriptFile::Execute(asIScriptFunction* function, const VariantVector& parameters, Variant* functionReturn, bool unprepare)
 {
     URHO3D_PROFILE(ExecuteFunction);
 
@@ -320,7 +320,123 @@ bool ScriptFile::Execute(asIScriptFunction* function, const VariantVector& param
     SetParameters(context, function, parameters);
 
     scriptSystem->IncScriptNestingLevel();
-    bool success = context->Execute() >= 0;
+    bool success = (context->Execute() == asEXECUTION_FINISHED);
+    if (success && (functionReturn != nullptr))
+    {
+        const int typeId = function->GetReturnTypeId();
+
+        asIScriptEngine* engine = script_->GetScriptEngine();
+        asITypeInfo* typeInfo = engine->GetTypeInfoById(typeId);
+
+        // Built-in type
+        if (typeInfo == nullptr)
+        {
+            switch (typeId)
+            {
+            case asTYPEID_VOID:
+                *functionReturn = Variant::EMPTY;
+                break;
+
+            case asTYPEID_BOOL:
+                *functionReturn = Variant(context->GetReturnByte() > 0);
+                break;
+
+            case asTYPEID_INT8:
+            case asTYPEID_UINT8:
+            case asTYPEID_INT16:
+            case asTYPEID_UINT16:
+            case asTYPEID_INT32:
+            case asTYPEID_UINT32:
+                *functionReturn = Variant(static_cast<int>(context->GetReturnDWord()));
+                break;
+
+            case asTYPEID_INT64:
+            case asTYPEID_UINT64:
+                *functionReturn = Variant(static_cast<long long>(context->GetReturnQWord()));
+                break;
+
+            case asTYPEID_FLOAT:
+                *functionReturn = Variant(context->GetReturnFloat());
+                break;
+
+            case asTYPEID_DOUBLE:
+                *functionReturn = Variant(context->GetReturnDouble());
+                break;
+            }
+        }
+        else if (typeInfo->GetFlags() & asOBJ_REF)
+        {
+            *functionReturn = Variant(static_cast<RefCounted*>(context->GetReturnObject()));
+        }
+        else if (typeInfo->GetFlags() & asOBJ_VALUE)
+        {
+            void* returnedObject = context->GetReturnObject();
+
+            const VariantType variantType = Variant::GetTypeFromName(typeInfo->GetName());
+            switch (variantType)
+            {
+            case VAR_STRING:
+                *functionReturn = *static_cast<String*>(returnedObject);
+                break;
+
+            case VAR_VECTOR2:
+                *functionReturn = *static_cast<Vector2*>(returnedObject);
+                break;
+
+            case VAR_VECTOR3:
+                *functionReturn = *static_cast<Vector3*>(returnedObject);
+                break;
+
+            case VAR_VECTOR4:
+                *functionReturn = *static_cast<Vector4*>(returnedObject);
+                break;
+
+            case VAR_QUATERNION:
+                *functionReturn = *static_cast<Quaternion*>(returnedObject);
+                break;
+
+            case VAR_COLOR:
+                *functionReturn = *static_cast<Color*>(returnedObject);
+                break;
+
+            case VAR_INTRECT:
+                *functionReturn = *static_cast<IntRect*>(returnedObject);
+                break;
+
+            case VAR_INTVECTOR2:
+                *functionReturn = *static_cast<IntVector2*>(returnedObject);
+                break;
+
+            case VAR_MATRIX3:
+                *functionReturn = *static_cast<Matrix3*>(returnedObject);
+                break;
+
+            case VAR_MATRIX3X4:
+                *functionReturn = *static_cast<Matrix3x4*>(returnedObject);
+                break;
+
+            case VAR_MATRIX4:
+                *functionReturn = *static_cast<Matrix4*>(returnedObject);
+                break;
+
+            case VAR_RECT:
+                *functionReturn = *static_cast<Rect*>(returnedObject);
+                break;
+
+            case VAR_INTVECTOR3:
+                *functionReturn = *static_cast<IntVector3*>(returnedObject);
+                break;
+
+            default:
+                URHO3D_LOGERRORF("Return type (%c) is not supported", typeInfo->GetName());
+                break;
+            }
+        }
+        else
+        {
+            URHO3D_LOGERRORF("Return type (%c)is not supported", typeInfo->GetName());
+        }
+    }
     if (unprepare)
         context->Unprepare();
     scriptSystem->DecScriptNestingLevel();
@@ -328,7 +444,8 @@ bool ScriptFile::Execute(asIScriptFunction* function, const VariantVector& param
     return success;
 }
 
-bool ScriptFile::Execute(asIScriptObject* object, const String& declaration, const VariantVector& parameters, bool unprepare)
+bool ScriptFile::Execute(asIScriptObject* object, const String& declaration, const VariantVector& parameters, Variant* functionReturn,
+    bool unprepare)
 {
     if (!object)
         return false;
@@ -340,10 +457,11 @@ bool ScriptFile::Execute(asIScriptObject* object, const String& declaration, con
         return false;
     }
 
-    return Execute(object, method, parameters, unprepare);
+    return Execute(object, method, parameters, functionReturn, unprepare);
 }
 
-bool ScriptFile::Execute(asIScriptObject* object, asIScriptFunction* method, const VariantVector& parameters, bool unprepare)
+bool ScriptFile::Execute(asIScriptObject* object, asIScriptFunction* method, const VariantVector& parameters, Variant* functionReturn,
+    bool unprepare)
 {
     URHO3D_PROFILE(ExecuteMethod);
 

+ 7 - 4
Source/Urho3D/AngelScript/ScriptFile.h

@@ -80,15 +80,18 @@ public:
     bool HasEventHandler(Object* sender, StringHash eventType) const override;
 
     /// Query for a function by declaration and execute if found.
-    bool Execute(const String& declaration, const VariantVector& parameters = Variant::emptyVariantVector, bool unprepare = true);
+    bool Execute(const String& declaration, const VariantVector& parameters = Variant::emptyVariantVector,
+        Variant* functionReturn = nullptr, bool unprepare = true);
     /// Execute a function.
-    bool Execute(asIScriptFunction* function, const VariantVector& parameters = Variant::emptyVariantVector, bool unprepare = true);
+    bool Execute(asIScriptFunction* function, const VariantVector& parameters = Variant::emptyVariantVector,
+        Variant* functionReturn = nullptr, bool unprepare = true);
     /// Query for an object method by declaration and execute if found.
     bool Execute(asIScriptObject* object, const String& declaration, const VariantVector& parameters = Variant::emptyVariantVector,
-        bool unprepare = true);
+        Variant* functionReturn = nullptr, bool unprepare = true);
     /// Execute an object method.
     bool Execute(asIScriptObject* object, asIScriptFunction* method, const VariantVector& parameters = Variant::emptyVariantVector,
-        bool unprepare = true);
+        Variant* functionReturn = nullptr, bool unprepare = true);
+
     /// Add a delay-executed function call, optionally repeating.
     void DelayedExecute
         (float delay, bool repeat, const String& declaration, const VariantVector& parameters = Variant::emptyVariantVector);

+ 1 - 1
Source/Urho3D/Audio/SoundStream.cpp

@@ -64,4 +64,4 @@ unsigned SoundStream::GetSampleSize() const
     return size;
 }
 
-};
+}

+ 3 - 2
Source/Urho3D/Container/HashMap.h

@@ -357,13 +357,14 @@ public:
     {
         this->operator [](key) = value;
         return *this;
-    };
+    }
+
     /// Populate the map using variadic template.
     template <typename... Args> HashMap& Populate(const T& key, const U& value, const Args&... args)
     {
         this->operator [](key) = value;
         return Populate(args...);
-    };
+    }
 
     /// Insert a pair. Return an iterator to it.
     Iterator Insert(const Pair<T, U>& pair)

+ 1 - 1
Source/Urho3D/Engine/Application.h

@@ -77,7 +77,7 @@ int RunApplication() \
     Urho3D::SharedPtr<className> application(new className(context)); \
     return application->Run(); \
 } \
-URHO3D_DEFINE_MAIN(RunApplication());
+URHO3D_DEFINE_MAIN(RunApplication())
 #else
 // On iOS/tvOS we will let this function exit, so do not hold the context and application in SharedPtr's
 #define URHO3D_DEFINE_APPLICATION_MAIN(className) \

+ 1 - 0
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -81,6 +81,7 @@ static const DWORD d3dBlendEnable[] =
     TRUE,
     TRUE,
     TRUE,
+    TRUE,
     TRUE
 };
 

+ 1 - 0
Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -125,6 +125,7 @@ static const DWORD d3dBlendEnable[] =
     TRUE,
     TRUE,
     TRUE,
+    TRUE,
     TRUE
 };
 

+ 1 - 1
Source/Urho3D/Graphics/Renderer.cpp

@@ -1941,7 +1941,7 @@ String Renderer::GetShadowVariations() const
             return "VSM_SHADOW ";
     }
     return "";
-};
+}
 
 void Renderer::HandleScreenMode(StringHash eventType, VariantMap& eventData)
 {

+ 1 - 1
Source/Urho3D/IO/AbstractFile.h

@@ -40,4 +40,4 @@ public:
     ~AbstractFile() override = default;
 };
 
-};
+}

+ 1 - 1
Source/Urho3D/LuaScript/LuaScriptEventListener.h

@@ -32,7 +32,7 @@ class URHO3D_API LuaScriptEventListener
 {
 public:
     /// Destruct.
-    virtual ~LuaScriptEventListener() = default;;
+    virtual ~LuaScriptEventListener() = default;
 
     /// Add a scripted event handler by function at the given stack index.
     virtual void AddEventHandler(const String& eventName, int index) = 0;

+ 3 - 0
Source/Urho3D/LuaScript/pkgs/ToCppHook.lua

@@ -104,6 +104,9 @@ function post_output_hook(package)
     result = string.gsub(result, "@1%(", "(\"\",")      -- is_pointer overload uses const char* as signature
     result = string.gsub(result, "@2%(", "(0.f,")       -- is_arithmetic overload uses double as signature
 
+    -- Suppress GCC 'pedantic' warnings due to extra semicolon in the emitted code
+    result = string.gsub(result, "TOLUA_API int luaopen_(.+)};", "TOLUA_API int luaopen_%1}")
+
     WRITE(result)
     WRITE([[
 #if __clang__

+ 2 - 2
Source/Urho3D/Scene/SceneEvents.h

@@ -102,13 +102,13 @@ URHO3D_EVENT(E_ASYNCLOADPROGRESS, AsyncLoadProgress)
     URHO3D_PARAM(P_TOTALNODES, TotalNodes);        // int
     URHO3D_PARAM(P_LOADEDRESOURCES, LoadedResources); // int
     URHO3D_PARAM(P_TOTALRESOURCES, TotalResources);   // int
-};
+}
 
 /// Asynchronous scene loading finished.
 URHO3D_EVENT(E_ASYNCLOADFINISHED, AsyncLoadFinished)
 {
     URHO3D_PARAM(P_SCENE, Scene);                  // Scene pointer
-};
+}
 
 /// A child node has been added to a parent node.
 URHO3D_EVENT(E_NODEADDED, NodeAdded)

+ 1 - 1
Source/Urho3D/Scene/SplinePath.h

@@ -45,7 +45,7 @@ public:
     explicit SplinePath(Context* context);
 
     /// Destructor.
-    ~SplinePath() override = default;;
+    ~SplinePath() override = default;
     /// Register object factory.
     static void RegisterObject(Context* context);
 

+ 1 - 1
Source/Urho3D/UI/ListView.h

@@ -130,7 +130,7 @@ public:
     UIElement* GetSelectedItem() const;
     /// Return all selected items.
     PODVector<UIElement*> GetSelectedItems() const;
-    /// Return whether an item at index is seleccted.
+    /// Return whether an item at index is selected.
     bool IsSelected(unsigned index) const;
     /// Return whether an item at index has its children expanded (in hierarchy mode only).
     bool IsExpanded(unsigned index) const;

+ 2 - 2
Source/Urho3D/UI/UIEvents.h

@@ -105,7 +105,7 @@ URHO3D_EVENT(E_DRAGDROPTEST, DragDropTest)
     URHO3D_PARAM(P_SOURCE, Source);                // UIElement pointer
     URHO3D_PARAM(P_TARGET, Target);                // UIElement pointer
     URHO3D_PARAM(P_ACCEPT, Accept);                // bool
-};
+}
 
 /// Drag and drop finish.
 URHO3D_EVENT(E_DRAGDROPFINISH, DragDropFinish)
@@ -113,7 +113,7 @@ URHO3D_EVENT(E_DRAGDROPFINISH, DragDropFinish)
     URHO3D_PARAM(P_SOURCE, Source);                // UIElement pointer
     URHO3D_PARAM(P_TARGET, Target);                // UIElement pointer
     URHO3D_PARAM(P_ACCEPT, Accept);                // bool
-};
+}
 
 /// Focus element changed.
 URHO3D_EVENT(E_FOCUSCHANGED, FocusChanged)

+ 7 - 5
Source/Urho3D/Urho2D/ParticleEmitter2D.cpp

@@ -167,11 +167,13 @@ void ParticleEmitter2D::SetSpriteAttr(const ResourceRef& value)
 
 void ParticleEmitter2D::SetEmitting(bool enable)
 {
-    if (enable != emitting_)
-    {
-        emitting_ = enable;
-        emitParticleTime_ = 0.0f;
-    }
+    if (enable == emitting_)
+        return;
+
+    emitting_ = enable;
+    emitParticleTime_ = 0.0f;
+
+    MarkNetworkUpdate();
 }
 
 ResourceRef ParticleEmitter2D::GetSpriteAttr() const

+ 1 - 1
bin/Data/LuaScripts/06_SkeletalAnimation.lua

@@ -64,7 +64,7 @@ function CreateScene()
     light.shadowCascade = CascadeParameters(10.0, 50.0, 200.0, 0.0, 0.8)
 
     -- Create animated models
-    local uint NUM_MODELS = 30
+    local NUM_MODELS = 30
     local MODEL_MOVE_SPEED = 2.0
     local MODEL_ROTATE_SPEED = 100.0
     local bounds = BoundingBox(Vector3(-20.0, 0.0, -20.0), Vector3(20.0, 0.0, 20.0))