Linked entities

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

Linked entities

by sapier » Mon Jan 09, 2012 01:50

This patch adds two lua funktions linking entities to each other.

So whats meant by "linking".

if you call child_entity:link(parent_entiy,{x=1,y=2,z=3}) the client and server disable calculation of child movement but place child entity at distance (1,2,3) of parent entity. Anytime parent entity moves child entity is moved too.

you can revert this by calling child_entity:unlink().

Intention is to add this link capability to player too thus enabling the player to take seat in any sort of entity.

Imagine creating trains of linked entities, lifts or minecarts.

Patch (requires cao/sao split patch)

EDIT2: link feature moved to derivable base class
Patch V2 (still requires cao/sao split patch)

http://c55.me/minetest/forum/viewtopic.php?id=771 (CAO/SAO split patch)
Last edited by sapier on Mon Jan 09, 2012 20:13, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 2 guests

cron