putto fix
This commit is contained in:
parent
b2dd1f4d8a
commit
8625747b57
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -5,7 +5,7 @@ instead (0.9.3) unstable; urgency=low
|
||||||
* print reregister
|
* print reregister
|
||||||
* deref is more clever!!! It not do duble objects now
|
* deref is more clever!!! It not do duble objects now
|
||||||
* from() with argument
|
* from() with argument
|
||||||
* new() (allocator object)
|
* new()/delete() (allocator object)
|
||||||
* game:ini() fix
|
* game:ini() fix
|
||||||
|
|
||||||
-- Peter Kosyh <p.kosyh@gmail.com> Mon, 12 Oct 2009 11:09:19 +0400
|
-- Peter Kosyh <p.kosyh@gmail.com> Mon, 12 Oct 2009 11:09:19 +0400
|
||||||
|
|
|
@ -1827,16 +1827,21 @@ function take(obj, wh)
|
||||||
end
|
end
|
||||||
|
|
||||||
function putto(obj, w, pos)
|
function putto(obj, w, pos)
|
||||||
|
local wh
|
||||||
local o = ref(obj);
|
local o = ref(obj);
|
||||||
if not isObject(o) then
|
if not isObject(o) then
|
||||||
error "Trying to put wrong object.";
|
error "Trying to put wrong object.";
|
||||||
end
|
end
|
||||||
if not w then
|
if not w then
|
||||||
here().obj:add(obj, pos);
|
wh = deref(here());
|
||||||
o.__where__ = deref(here());
|
w = here();
|
||||||
else
|
else
|
||||||
ref(w).obj:add(obj, pos);
|
wh = deref(w);
|
||||||
o.__where__ = deref(w);
|
w = ref(w);
|
||||||
|
end
|
||||||
|
w.obj:add(obj, pos);
|
||||||
|
if type(wh) == 'string' then
|
||||||
|
o.__where__ = wh;
|
||||||
end
|
end
|
||||||
return o;
|
return o;
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue