Fixed a c4script runtime error in tutorial 3

stable-5.3
Maikel de Vries 2012-11-04 14:03:36 +01:00
parent ff47339e80
commit 3529769011
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ protected func Destruction()
var x = BoundBy(GetX(), 0, LandscapeWidth());
var y = BoundBy(GetY(), 0, LandscapeHeight());
var duplicate = CreateObject(GetID(), x, y, GetOwner());
duplicate->~SetStackCount(GetStackCount());
var cnt = this->~GetStackCount();
duplicate->~SetStackCount(cnt);
if (GetID() == Bow) duplicate->CreateContents(Arrow)->SetStackCount(FindContents(Arrow)->GetStackCount());
restorer->SetPosition(x, y);
var to_container = FindObject(Find_OCF(OCF_CrewMember));