Changeset 7463 for code/trunk/src/modules/objects/Script.cc
- Timestamp:
- Sep 17, 2010, 9:41:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/Script.cc
r7410 r7463 32 32 #include "core/CoreIncludes.h" 33 33 #include "core/EventIncludes.h" 34 #include "core/GameMode.h" 34 35 #include "core/LuaState.h" 35 36 #include "core/XMLPort.h" … … 57 58 this->luaState_ = NULL; 58 59 this->remainingExecutions_ = Script::INF; 60 this->mode_ = ScriptMode::normal; 61 this->onLoad_ = true; 62 this->times_ = Script::INF; 63 this->needsGraphics_ = false; 59 64 60 65 } … … 86 91 XMLPortParam(Script, "onLoad", setOnLoad, isOnLoad, xmlelement, mode).defaultValues(true); 87 92 XMLPortParam(Script, "times", setTimes, getTimes, xmlelement, mode).defaultValues(Script::INF); 93 XMLPortParam(Script, "needsGraphics", setNeedsGraphics, getNeedsGraphics, xmlelement, mode).defaultValues(false); 88 94 89 95 XMLPortEventSink(Script, BaseObject, "trigger", trigger, xmlelement, mode); … … 127 133 { 128 134 if(this->times_ != Script::INF && this->remainingExecutions_ == 0) 135 return; 136 137 // If the code needs graphics to be executed but the GameMode doesn't show graphics the code isn't executed. 138 if(this->needsGraphics_ && !GameMode::showsGraphics()) 129 139 return; 130 140
Note: See TracChangeset
for help on using the changeset viewer.