Expose getDifficulty() to scripting
This commit is contained in:
parent
68aa1c3346
commit
712854b33a
@ -179,6 +179,15 @@ namespace Scripting
|
||||
{
|
||||
return RaceManager::get()->getReverseTrack();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the difficulty setting for this race.
|
||||
* @return A Difficulty enum as defined in race_manager.hpp, implicitly casted to an int
|
||||
*/
|
||||
int getDifficulty()
|
||||
{
|
||||
return RaceManager::get()->getDifficulty();
|
||||
}
|
||||
|
||||
int getMajorRaceMode()
|
||||
{
|
||||
@ -571,6 +580,10 @@ namespace Scripting
|
||||
r = engine->RegisterGlobalFunction("bool isReverse()",
|
||||
mp ? WRAP_FN(isTrackReverse) : asFUNCTION(isTrackReverse),
|
||||
call_conv); assert(r >= 0);
|
||||
|
||||
r = engine->RegisterGlobalFunction("int getDifficulty()",
|
||||
mp ? WRAP_FN(getDifficulty) : asFUNCTION(getDifficulty),
|
||||
call_conv); assert(r >= 0);
|
||||
|
||||
r = engine->RegisterGlobalFunction("int getMajorRaceMode()",
|
||||
mp ? WRAP_FN(getMajorRaceMode) : asFUNCTION(getMajorRaceMode),
|
||||
|
Loading…
x
Reference in New Issue
Block a user