Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (20 sloc) 0.717 kb
#ifndef _LUASYSTEMBODY_H
#define _LUASYSTEMBODY_H
#include "LuaObject.h"
#include "galaxy/StarSystem.h"
// this specialisation clears out the copied SystemBody parent and children list,
// which right now points to other SystemBodys in a StarSystem somewhere, and will
// be deleted when the system is deleted. without this we crash when this
// object is collected/destroyed.
template <>
class LuaAcquirer< LuaUncopyable<SystemBody> > {
public:
virtual void OnAcquire(LuaUncopyable<SystemBody> *o) {
o->parent = 0;
o->children.clear();
}
virtual void OnRelease(LuaUncopyable<SystemBody> *o) { }
};
class SystemBody;
typedef LuaObjectUncopyable<SystemBody,LuaUncopyable<SystemBody> > LuaSystemBody;
#endif
Jump to Line
Something went wrong with that request. Please try again.