equal
deleted
inserted
replaced
24 */ |
24 */ |
25 void SetCommandDelay(uint ticks); |
25 void SetCommandDelay(uint ticks); |
26 }; |
26 }; |
27 |
27 |
28 #ifdef DEFINE_SQUIRREL_CLASS |
28 #ifdef DEFINE_SQUIRREL_CLASS |
|
29 namespace SQConvert { |
|
30 /* Allow AISettings to be used as Squirrel parameter */ |
|
31 template <> AISettings *GetParam(ForceType<AISettings *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AISettings *)instance; } |
|
32 }; // namespace SQConvert |
|
33 |
29 void SQAISettingsRegister(Squirrel *engine) { |
34 void SQAISettingsRegister(Squirrel *engine) { |
30 DefSQClass <AISettings> SQAISettings("AISettings"); |
35 DefSQClass <AISettings> SQAISettings("AISettings"); |
31 SQAISettings.PreRegister(engine); |
36 SQAISettings.PreRegister(engine); |
32 SQAISettings.AddConstructor(engine); |
37 SQAISettings.AddConstructor(engine); |
33 SQAISettings.DefSQFunction(engine, &AISettings::SetCommandDelay, "SetCommandDelay"); |
38 SQAISettings.DefSQFunction(engine, &AISettings::SetCommandDelay, "SetCommandDelay"); |