Populous: The Beginning Script 3  1.0.0
Documentation for Populous Script 3 engine

◆ load()

template<class Archive >
void ObjectProxy::load ( Archive &  ar)
inline

Definition at line 43 of file ObjectProxy.h.

44  {
45  ThingNum ThingID;
46  ar(POP3SAVENAME(Header), POP3SAVENAME(ThingID));
47  if (ThingID > 0)
48  {
49  if (!gsi.ObjectMan.isLoadingCritical())
50  {
51  t_thing = gsi.ObjectMan.getThingWhileLoading(ThingID);
52  ASSERT(t_thing->Type);
53  if (t_thing)
54  gsi.ObjectMan.addReference(this);
55  }
56  else
57  {
58  t_thing = nullptr;
59  gsi.ObjectMan.addMeToQueue(this, ThingID);
60  }
61  }
62 
63  else t_thing = nullptr;
64  }
Thing * t_thing
Definition: ObjectProxy.h:122
_U_OBJ_LIST Header
Definition: ObjectProxy.h:121
unsigned char Type
GlobalSaveItems gsi

References gsi, Header, t_thing, and Thing::Type.