From f77b4134b4113b9243d02e1d9e395fc0e463fa04 Mon Sep 17 00:00:00 2001 From: Felix Wagner Date: Sun, 13 May 2012 20:54:24 +0100 Subject: [PATCH] Removed GetConstructionDirection() --- .../Libraries.ocd/Constructor.ocd/Script.c | 7 ------- .../Objects.ocd/Libraries.ocd/Structure.ocd/Script.c | 12 ------------ 2 files changed, 19 deletions(-) diff --git a/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c index 0ec931cb5..e61ff39eb 100644 --- a/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c @@ -181,8 +181,6 @@ func CreateConstructionSite(object clonk, id structure_id, int x, int y, int dir // Set owner for CreateConstruction SetOwner(clonk->GetOwner()); - // Save direction so the structure can ask for it - this.constructionDirection = dir; // Create construction site var site; site = CreateObject(ConstructionSite, x, y, Contained()->GetOwner()); @@ -229,9 +227,4 @@ func CreateConstructionSite(object clonk, id structure_id, int x, int y, int dir // Message clonk->Message("$TxtConstructions$", structure_id->GetName()); return true; -} -// Returns the desired direction for a construction -func GetConstructionDirection() -{ - return this.constructionDirection; } \ No newline at end of file diff --git a/planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c index 4d3d469aa..191c99f2d 100644 --- a/planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c @@ -16,16 +16,4 @@ public func Damage(int change, int cause, int cause_plr) return RemoveObject(); } return _inherited(change, cause, cause_plr); -} - -public func Construction(object creator) -{ - if (creator) - { - // Set dir according to the direction specified by the creator. - var dir = creator->~GetConstructionDirection(); - if (dir) - SetDir(dir); - } - return _inherited(creator, ...); } \ No newline at end of file