Compat for Kart v1 TC modes
This commit is contained in:
parent
5082c343c8
commit
1a9dfea86d
1 changed files with 24 additions and 2 deletions
|
|
@ -1128,9 +1128,31 @@ static int libd_getColormap(lua_State *L)
|
|||
{
|
||||
if (skinnum >= MAXSKINS)
|
||||
return luaL_error(L, "skin number %d is out of range (>%d)", skinnum, MAXSKINS-1);
|
||||
else if (skinnum < 0 && skinnum > TC_DEFAULT)
|
||||
else if (skinnum < TC_BOSS && skinnum > MAXSKINS)
|
||||
{
|
||||
skinnum = TC_DEFAULT;
|
||||
return luaL_error(L, "skin number %d is out of range (%d - %d)", skinnum, TC_BOSS, MAXSKINS-1);
|
||||
}
|
||||
|
||||
switch(skinnum)
|
||||
{
|
||||
case -6:
|
||||
skinnum = TC_BLINK;
|
||||
break;
|
||||
case -5:
|
||||
skinnum = TC_RAINBOW;
|
||||
break;
|
||||
case -4:
|
||||
skinnum = TC_ALLWHITE;
|
||||
break;
|
||||
case -3:
|
||||
skinnum = TC_METALSONIC;
|
||||
break;
|
||||
case -2:
|
||||
skinnum = TC_BOSS;
|
||||
break;
|
||||
case -1:
|
||||
skinnum = TC_DEFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue