From 94151dda609ca8622bf6eabc287369c6c228ee84 Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Thu, 17 Dec 2015 20:25:05 -0500 Subject: [PATCH] Add forgotten file --- src/scriptengine/script_track.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/scriptengine/script_track.cpp b/src/scriptengine/script_track.cpp index 3b91e30c2..1b3a0570c 100644 --- a/src/scriptengine/script_track.cpp +++ b/src/scriptengine/script_track.cpp @@ -135,6 +135,16 @@ namespace Scripting new RacePausedDialog(0.8f, 0.6f); } + int getNumberOfKarts() + { + return race_manager->getNumberOfKarts(); + } + + int getNumLocalPlayers() + { + return race_manager->getNumLocalPlayers(); + } + void setFog(float maxDensity, float start, float end, int r, int g, int b, float duration) { PropertyAnimator* animator = PropertyAnimator::get(); @@ -365,6 +375,8 @@ namespace Scripting r = engine->RegisterGlobalFunction("void exitRace()", asFUNCTION(exitRace), asCALL_CDECL); assert(r >= 0); r = engine->RegisterGlobalFunction("void pauseRace()", asFUNCTION(pauseRace), asCALL_CDECL); assert(r >= 0); r = engine->RegisterGlobalFunction("void setFog(float maxDensity, float start, float end, int r, int g, int b, float duration)", asFUNCTION(setFog), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalFunction("int getNumberOfKarts()", asFUNCTION(getNumberOfKarts), asCALL_CDECL); assert(r >= 0); + r = engine->RegisterGlobalFunction("int getNumLocalPlayers()", asFUNCTION(getNumLocalPlayers), asCALL_CDECL); assert(r >= 0); // TrackObject r = engine->RegisterObjectMethod("TrackObject", "void setEnabled(bool status)", asMETHOD(::TrackObject, setEnabled), asCALL_THISCALL); assert(r >= 0);