int getCylinderData(Cylinder* c) { int inputOK = 1; if (!c) { return 0; } c->radius = getCylinderRadius(); c->height = getCylinderHeight(); if (c->radius <= 0 || c->height <= 0) { inputOK = 0; } return inputOK; }
void Trigger::load(const PropertyBag &xml) { Actor::load(xml); loadList(xml, "sounds", sounds); if(xml.exists("triggerRadius")) { xml.get("triggerRadius", triggerRadius); } else { triggerRadius = getCylinderRadius(); // default } }