moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / game / action.cpp
blob143dc280a5e936dd83ed77a5561f3a13615095ce
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 /* Compiled through actset.cpp */
15 actionprototype::actionprototype (actionspawner Spawner, cchar *ClassID) :
16 Spawner(Spawner),
17 ClassID(ClassID)
19 Index = protocontainer<action>::Add(this);
23 void action::Terminate (truth) {
24 GetActor()->SetAction(0);
25 delete this;
29 void action::Save (outputfile &SaveFile) const {
30 SaveFile << (uShort)GetType() << Flags;
34 void action::Load (inputfile &SaveFile) {
35 SaveFile >> Flags;
39 action *actionprototype::SpawnAndLoad (inputfile &SaveFile) const {
40 action *Action = Spawner(0);
41 Action->Load(SaveFile);
42 return Action;