Commit Graph

52 Commits

Author SHA1 Message Date
Sasha Szpakowski b1609ed83b love.physics: simplify some internal bookkeeping code 2023-10-01 15:55:23 -03:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
Alex Szpakowski 7f3538d2ba Merge branch 'main' into 12.0-development 2022-01-05 21:10:27 -04:00
Alex Szpakowski 8e7fd10b6f Update copyright year for 2022 2021-12-31 18:33:40 -04:00
Alex Szpakowski 21f5ba86d3 Merge branch 'master' into 12.0-development 2021-04-07 20:33:44 -03:00
Alex Szpakowski f89aabb0bb Update copyright year for 2021 2021-04-04 16:14:45 -03:00
Garrett Brown 1b74b34cce Update userdata stuff to how new box2d wants it 2020-10-17 22:30:01 -04:00
Garrett Brown 77f238767f Update to box2d 2.4.1 2020-10-17 22:15:18 -04:00
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -04:00
Alex Szpakowski 3ad16a70da love.physics: move internal box2d->love object map to World instances, and clean up some physics object code. Resolves issue #1465. 2019-01-04 21:36:05 -04:00
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01:00
Alex Szpakowski 8ea2f09a1c Fix Fixture:getShape. Resolves issue #1319.
--HG--
branch : minor
2017-09-22 20:31:24 -03:00
Alex Szpakowski 34ebe18f14 Use luaL_check/optinteger instead of luaL_check/optnumber when getting integer arguments to functions. Resolves issue #1251.
--HG--
branch : minor
2017-07-16 12:17:50 -03:00
Alex Szpakowski b590edf27d Merge default into minor
--HG--
branch : minor
2017-04-30 00:37:26 -03:00
raidho36 6b7172bd40 Fix Issue #1273
Added Lua index registry clear routine to `destroy` method of classes that use it.
If this is left to GC, the abandoned userdata would stay in memory for one full extra cycle.

Prettified the code slightly. Clarified some comments. Refactored `Fixture` class `udata` name.
Removed Reference class include from `Shape` (it doesn't use it).
2017-04-14 05:53:36 +03:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Bart van Strien d967a755e5 Make love::Type handle type names
TODO: Fix undefined behaviour in luax_register_type, you can't use a va_list after a reference type

--HG--
branch : dynamiccore2
2016-11-14 21:06:53 +01:00
Bart van Strien c761202486 Build type information on first use (load-time), instead of using a hardcoded list
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Bart van Strien 0ce44e465d Catch possible Box2D exception in Fixture:getBoundingBox() (fixes #1196) 2016-08-02 13:07:05 +02:00
Alex Szpakowski 55cb2fad84 Fixture:setCategory and Fixture:setMask now accept a table of categories/masks (resolves issue #1178). 2016-07-31 11:51:53 -03:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski 2cce18946d Fixed objects which store Lua callback functions to avoid attempting to use dead coroutines when deleting the reference to the callback function. Should fix crashes when coroutines are mixed with those objects.
Also improved the performance of World:rayCast and World:queryBoundingBox.
2015-07-18 03:26:07 -03:00
Bart van Strien 3cb777e2b7 Add basic lua 5.3 support 2015-06-16 10:25:41 +02:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski 4faddcd9aa Fixed some trivial compiler warnings 2014-03-12 17:55:19 -03:00
Alex Szpakowski 2a19a4444e Allow Fixture:setUserData and Fixture:getUserData to be called in coroutines (resolves issue #850.)
Bad things will still happen if you call them from a love Thread which didn't create the World and the Fixture object. Don't do it!
2014-02-15 20:59:57 -04:00
Alex Szpakowski 3120a0e650 Goodbye 2013, hello 2014! 2014-01-03 17:28:58 -04:00
Alex Szpakowski bcee9a222b Made some float/int/unsigned char conversions explicit, fixed ParticleSystem:getColors, fixed love.mouse.isDown with x1 and x2 buttons 2013-09-26 00:36:50 -03:00
Alex Szpakowski 2561ace2d6 Fixed Fixture:getType crashing 2013-08-11 17:32:12 -03:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Aidan Gauland 27b62b5c9c Removed scaling of unit vectors. 2012-04-17 20:54:12 +12:00
Bill Meltsner 20f4e567b3 Fix Fixture:getShape(), for real this time.
All the Memoizer stuff was pointless: when you create a Fixture, it clones the b2Shape, so there was never going to be a memoized Shape to find. And cloning the Shape is incorrect as well, since you should able to modify the Shape retrieved through getShape and have it affect the Fixture. Everything's much simpler now.
2012-02-05 19:22:33 -05:00
Bill Meltsner f67d454aa3 Fix off-by-one error in Fixture:getBits 2012-02-04 19:45:38 -05:00
Bill Meltsner ddb1492c1f bounds check ChainShape:getPoint, and make functions that take indices 1-indexed on the Lua end of things 2012-02-04 19:38:11 -05:00
Bill Meltsner 83f7002f67 Remove the unnecessary transform arguments to Fixture:rayCast that some idiot blindly copy/pasted from Shape:rayCast 2012-02-04 19:16:27 -05:00
Bill Meltsner 2a88ed1fa5 Fix issues with Shape retention in Fixture:getShape() 2012-02-04 18:55:48 -05:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien 7c1e1fd0db Return nil if the raycasts don't hit anything (issue #335) 2012-01-08 13:27:10 +01:00
Bart van Strien c1f68e058d Use Box2D's callbacks for destruction of physics objects and wait until the end of the timestep before destroying them.
Merge of box2d-id2 from love-experiments
2012-01-08 13:16:50 +01:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
Bill Meltsner 3bd2316c6c Remove Fixture:getNext, it was just for testing
--HG--
branch : box2d-update
2011-09-24 17:14:03 -04:00
Bill Meltsner 8ae43be1fe Fix Fixture memory management issues
--HG--
branch : box2d-update
2011-09-24 14:54:06 -04:00
Bill Meltsner 06820210eb better Fixture Shape management
--HG--
branch : box2d-update
2011-09-24 13:21:50 -04:00
Bill Meltsner e962891ba2 Add Fixture:getNext()
--HG--
branch : box2d-update
2011-09-24 12:32:28 -04:00
Bill Meltsner c705063597 First attempt at implementing Memoization for certain Box2D objects
--HG--
branch : box2d-update
2011-09-24 12:20:59 -04:00
Bill Meltsner 0d4569d28b Add mandatory density argument to Body:createFixture
--HG--
branch : box2d-update
2011-09-24 02:34:27 -04:00