mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
just cast g_lang into lua's language code
because magically I got the enum order right first try
This commit is contained in:
@@ -96,6 +96,7 @@ extern "C" {
|
|||||||
#include "Merc Contract.h"
|
#include "Merc Contract.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Town Militia.h"
|
#include "Town Militia.h"
|
||||||
|
#include <language.hpp>
|
||||||
|
|
||||||
extern UINT8 gubWaitingForAllMercsToExitCode;
|
extern UINT8 gubWaitingForAllMercsToExitCode;
|
||||||
|
|
||||||
@@ -13208,26 +13209,7 @@ static int l_GetUsedLanguage( lua_State *L )
|
|||||||
{
|
{
|
||||||
if ( lua_gettop( L ) )
|
if ( lua_gettop( L ) )
|
||||||
{
|
{
|
||||||
INT32 val = 0;
|
INT32 val = static_cast<INT32>(g_lang);
|
||||||
|
|
||||||
#if defined(ENGLISH)
|
|
||||||
val = 0;
|
|
||||||
#elif defined(GERMAN)
|
|
||||||
val = 1;
|
|
||||||
#elif defined(RUSSIAN)
|
|
||||||
val = 2;
|
|
||||||
#elif defined(DUTCH)
|
|
||||||
val = 3;
|
|
||||||
#elif defined(POLISH)
|
|
||||||
val = 4;
|
|
||||||
#elif defined(FRENCH)
|
|
||||||
val = 5;
|
|
||||||
#elif defined(ITALIAN)
|
|
||||||
val = 6;
|
|
||||||
#elif defined(CHINESE)
|
|
||||||
val = 7;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lua_pushinteger( L, val );
|
lua_pushinteger( L, val );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user