Markus
2011-02-20 15:58:23
Use after free = ugly. Took me 45 seconds to find once someone told me objects were leaking. Really.
*** Objects.simba Sun Feb 20 20:54:04 2011
--- Objects2.simba Sun Feb 20 20:54:36 2011
***************
*** 75,87 ****
{*******************************************************************************
function GetInteractableAt(T: TTile): TRSObject;
! By: Drags111 modified/fixed by pyroryan. Fixed by Markus
Description: Returns the objType Interactable ID at the given tile. Interactable
objects include anything clickable that isnt a WallObject.
*******************************************************************************}
function GetInteractableAt(T: TTile): TRSObject;
var
! Plane, Ground, Node, Node2, Obj, ObjTemp, ID, LX, LY: integer;
TempBox: TBox;
TempTile, L, Base: TTile;
begin
--- 75,87 ----
{*******************************************************************************
function GetInteractableAt(T: TTile): TRSObject;
! By: Drags111 modified/fixed by pyroryan
Description: Returns the objType Interactable ID at the given tile. Interactable
objects include anything clickable that isnt a WallObject.
*******************************************************************************}
function GetInteractableAt(T: TTile): TRSObject;
var
! Plane, Ground, Node, Obj, ObjTemp, ID, LX, LY: integer;
TempBox: TBox;
TempTile, L, Base: TTile;
begin
***************
*** 129,137 ****
end;
SmartFreeObject(obj);
SmartFreeObject(ObjTemp);
- Node2 := SmartGetFieldObject(Node, hook_AnimableNode_GetNext);
SmartFreeObject(Node);
! Node := Node2;
end;
finally
--- 129,136 ----
end;
SmartFreeObject(obj);
SmartFreeObject(ObjTemp);
SmartFreeObject(Node);
! Node := SmartGetFieldObject(Node, hook_AnimableNode_GetNext);
end;
finally