Browse Source

Merge default into minor.

--HG--
branch : minor
Alex Szpakowski 8 years ago
parent
commit
c5b7a07064

+ 1 - 1
src/common/runtime.h

@@ -488,7 +488,7 @@ T *luax_getmodule(lua_State *L, const love::Type &type)
 	lua_getfield(L, -1, name);
 
 	if (!lua_isuserdata(L, -1))
-		luaL_error(L, "Tried to get nonexistant module %s.", name);
+		luaL_error(L, "Tried to get nonexistent module %s.", name);
 
 	Proxy *u = (Proxy *)lua_touserdata(L, -1);
 

+ 3 - 3
src/libraries/luasocket/libluasocket/http.lua

@@ -44,7 +44,7 @@ local function receiveheaders(sock, headers)
     while line ~= "" do
         -- get field-name and value
         name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)"))
-        if not (name and value) then return nil, "malformed reponse headers" end
+        if not (name and value) then return nil, "malformed response headers" end
         name = string.lower(name)
         -- get next line (value might be folded)
         line, err  = sock:receive()
@@ -71,7 +71,7 @@ socket.sourcet["http-chunked"] = function(sock, headers)
         dirty = function() return sock:dirty() end
     }, {
         __call = function()
-            -- get chunk size, skip extention
+            -- get chunk size, skip extension
             local line, err = sock:receive()
             if err then return nil, err end
             local size = base.tonumber(string.gsub(line, ";.*", ""), 16)
@@ -258,7 +258,7 @@ local function adjustrequest(reqt)
     if not (nreqt.host and nreqt.host ~= "") then
         socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'")
     end
-    -- compute uri if user hasn't overriden
+    -- compute uri if user hasn't overridden
     nreqt.uri = reqt.uri or adjusturi(nreqt)
     -- adjust headers in request
     nreqt.headers = adjustheaders(nreqt)

+ 1 - 1
src/libraries/luasocket/libluasocket/smtp.lua

@@ -225,7 +225,7 @@ local function adjust_headers(mesgt)
     lower["date"] = lower["date"] or
         os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE)
     lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
-    -- this can't be overriden
+    -- this can't be overridden
     lower["mime-version"] = "1.0"
     return lower
 end

+ 1 - 1
src/libraries/luasocket/libluasocket/url.lua

@@ -49,7 +49,7 @@ local function make_set(t)
     return s
 end
 
--- these are allowed withing a path segment, along with alphanum
+-- these are allowed within a path segment, along with alphanum
 -- other characters must be escaped
 local segment_set = make_set {
     "-", "_", ".", "!", "~", "*", "'", "(",

+ 1 - 1
src/modules/graphics/opengl/Shader.cpp

@@ -143,7 +143,7 @@ GLuint Shader::compileCode(ShaderStage stage, const std::string &code)
 
 void Shader::mapActiveUniforms()
 {
-	// Built-in uniform locations default to -1 (nonexistant.)
+	// Built-in uniform locations default to -1 (nonexistent.)
 	for (int i = 0; i < int(BUILTIN_MAX_ENUM); i++)
 		builtinUniforms[i] = -1;
 

+ 4 - 0
src/modules/physics/box2d/RopeJoint.cpp

@@ -61,6 +61,10 @@ float RopeJoint::getMaxLength() const
 	return Physics::scaleUp(joint->GetMaxLength());
 }
 
+void RopeJoint::setMaxLength(float maxLength)
+{
+	joint->SetMaxLength(Physics::scaleDown(maxLength));
+}
 
 } // box2d
 } // physics

+ 1 - 0
src/modules/physics/box2d/RopeJoint.h

@@ -52,6 +52,7 @@ public:
 	 * Gets the maximum length of the rope.
 	 **/
 	float getMaxLength() const;
+	void setMaxLength(float length);
 
 private:
 	// The Box2D RopeJoint object.

+ 9 - 0
src/modules/physics/box2d/wrap_RopeJoint.cpp

@@ -42,9 +42,18 @@ int w_RopeJoint_getMaxLength(lua_State *L)
 	return 1;
 }
 
+int w_RopeJoint_setMaxLength(lua_State *L)
+{
+	RopeJoint *t = luax_checkropejoint(L, 1);
+	float arg1 = (float)luaL_checknumber(L, 2);
+	t->setMaxLength(arg1);
+	return 0;
+}
+	
 static const luaL_Reg w_RopeJoint_functions[] =
 {
 	{ "getMaxLength", w_RopeJoint_getMaxLength },
+	{ "setMaxLength", w_RopeJoint_setMaxLength },
 	{ 0, 0 }
 };
 

+ 1 - 1
src/scripts/boot.lua

@@ -260,7 +260,7 @@ end
 
 local no_game_code = false
 
--- This can't be overriden.
+-- This can't be overridden.
 function love.boot()
 
 	-- This is absolutely needed.