2
Copyright (C) 2006 Parallel Realities
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
See the GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
#include "../headers.h"
23
Structure::Structure()
25
boundingBox.mins.set(0, 0, 0);
26
boundingBox.maxs.set(0, 0, 0);
28
flags = EF_IMMORTAL+EF_NOCLIP+EF_WEIGHTLESS;
38
isMissionTarget = false;
41
Structure::~Structure()
45
void Structure::loadAdditional(Properties *props)
47
state = props->getInt("state", state);
48
speed = props->getFloat("speed", speed);
49
active = props->getInt("active", active);
50
startPosition = props->getVector("startPosition", startPosition);
51
endPosition = props->getVector("endPosition", endPosition);
52
MDLModelName = props->getString("model", MDLModelName.getText());
53
hint = props->getInt("hint", hint);
54
isMissionTarget = props->getInt("isMissionTarget", isMissionTarget);
57
void Structure::saveAdditional(Properties *props)
59
props->setProperty("state", state);
60
props->setProperty("speed", speed);
61
props->setProperty("active", active);
62
props->setProperty("startPosition", startPosition.toString());
63
props->setProperty("endPosition", endPosition.toString());
64
props->setProperty("model", MDLModelName.getText());
65
props->setProperty("hint", hint);
66
props->setProperty("isMissionTarget", isMissionTarget);