Lowercase player_t from Lua, take 2

This commit is contained in:
AJ Martinez 2024-03-27 14:32:07 -07:00
parent ab6c770657
commit 83e2e9ed98

View file

@ -241,19 +241,19 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->spinouttimer); lua_pushinteger(L, plr->spinouttimer);
else if (fastcmp(field,"instashield")) else if (fastcmp(field,"instashield"))
lua_pushinteger(L, plr->instashield); lua_pushinteger(L, plr->instashield);
else if (fastcmp(field,"nullHitlag")) else if (fastcmp(field,"nullhitlag"))
lua_pushinteger(L, plr->nullHitlag); lua_pushinteger(L, plr->nullHitlag);
else if (fastcmp(field,"wipeoutslow")) else if (fastcmp(field,"wipeoutslow"))
lua_pushinteger(L, plr->wipeoutslow); lua_pushinteger(L, plr->wipeoutslow);
else if (fastcmp(field,"justbumped")) else if (fastcmp(field,"justbumped"))
lua_pushinteger(L, plr->justbumped); lua_pushinteger(L, plr->justbumped);
else if (fastcmp(field,"tumbleBounces")) else if (fastcmp(field,"tumblebounces"))
lua_pushinteger(L, plr->tumbleBounces); lua_pushinteger(L, plr->tumbleBounces);
else if (fastcmp(field,"tumbleHeight")) else if (fastcmp(field,"tumbleheight"))
lua_pushinteger(L, plr->tumbleHeight); lua_pushinteger(L, plr->tumbleHeight);
else if (fastcmp(field,"justDI")) else if (fastcmp(field,"justdi"))
lua_pushinteger(L, plr->justDI); lua_pushinteger(L, plr->justDI);
else if (fastcmp(field,"flipDI")) else if (fastcmp(field,"flipdi"))
lua_pushboolean(L, plr->flipDI); lua_pushboolean(L, plr->flipDI);
else if (fastcmp(field,"analoginput")) else if (fastcmp(field,"analoginput"))
lua_pushboolean(L, plr->analoginput); lua_pushboolean(L, plr->analoginput);
@ -285,9 +285,9 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->driftboost); lua_pushinteger(L, plr->driftboost);
else if (fastcmp(field,"strongdriftboost")) else if (fastcmp(field,"strongdriftboost"))
lua_pushinteger(L, plr->strongdriftboost); lua_pushinteger(L, plr->strongdriftboost);
else if (fastcmp(field,"gateBoost")) else if (fastcmp(field,"gateboost"))
lua_pushinteger(L, plr->gateBoost); lua_pushinteger(L, plr->gateBoost);
else if (fastcmp(field,"gateSound")) else if (fastcmp(field,"gatesound"))
lua_pushinteger(L, plr->gateSound); lua_pushinteger(L, plr->gateSound);
else if (fastcmp(field,"aizdriftstraft")) else if (fastcmp(field,"aizdriftstraft"))
lua_pushinteger(L, plr->aizdriftstrat); lua_pushinteger(L, plr->aizdriftstrat);
@ -315,7 +315,7 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->spindashboost); lua_pushinteger(L, plr->spindashboost);
else if (fastcmp(field,"fastfall")) else if (fastcmp(field,"fastfall"))
lua_pushfixed(L, plr->fastfall); lua_pushfixed(L, plr->fastfall);
else if (fastcmp(field,"fastfallBase")) else if (fastcmp(field,"fastfallbase"))
lua_pushfixed(L, plr->fastfallBase); lua_pushfixed(L, plr->fastfallBase);
else if (fastcmp(field,"numboosts")) else if (fastcmp(field,"numboosts"))
lua_pushinteger(L, plr->numboosts); lua_pushinteger(L, plr->numboosts);
@ -335,13 +335,13 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->draftleeway); lua_pushinteger(L, plr->draftleeway);
else if (fastcmp(field,"lastdraft")) else if (fastcmp(field,"lastdraft"))
lua_pushinteger(L, plr->lastdraft); lua_pushinteger(L, plr->lastdraft);
else if (fastcmp(field,"tripwireState")) else if (fastcmp(field,"tripwirestate"))
lua_pushinteger(L, plr->tripwireState); lua_pushinteger(L, plr->tripwireState);
else if (fastcmp(field,"tripwirePass")) else if (fastcmp(field,"tripwirepass"))
lua_pushinteger(L, plr->tripwirePass); lua_pushinteger(L, plr->tripwirePass);
else if (fastcmp(field,"tripwireLeniency")) else if (fastcmp(field,"tripwireleniency"))
lua_pushinteger(L, plr->tripwireLeniency); lua_pushinteger(L, plr->tripwireLeniency);
else if (fastcmp(field,"tripwireReboundDelay")) else if (fastcmp(field,"tripwirerebounddelay"))
lua_pushinteger(L, plr->tripwireReboundDelay); lua_pushinteger(L, plr->tripwireReboundDelay);
else if (fastcmp(field,"wavedash")) else if (fastcmp(field,"wavedash"))
lua_pushinteger(L, plr->wavedash); lua_pushinteger(L, plr->wavedash);
@ -363,19 +363,19 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->lastsafelap); lua_pushinteger(L, plr->lastsafelap);
else if (fastcmp(field,"lastsafecheatcheck")) else if (fastcmp(field,"lastsafecheatcheck"))
lua_pushinteger(L, plr->lastsafecheatcheck); lua_pushinteger(L, plr->lastsafecheatcheck);
else if (fastcmp(field,"topAccel")) else if (fastcmp(field,"topaccel"))
lua_pushinteger(L, plr->topAccel); lua_pushinteger(L, plr->topAccel);
else if (fastcmp(field,"instaWhipCharge")) else if (fastcmp(field,"instawhipcharge"))
lua_pushinteger(L, plr->instaWhipCharge); lua_pushinteger(L, plr->instaWhipCharge);
else if (fastcmp(field,"pitblame")) else if (fastcmp(field,"pitblame"))
lua_pushinteger(L, plr->pitblame); lua_pushinteger(L, plr->pitblame);
else if (fastcmp(field,"defenseLockout")) else if (fastcmp(field,"defenselockout"))
lua_pushinteger(L, plr->defenseLockout); lua_pushinteger(L, plr->defenseLockout);
else if (fastcmp(field,"oldGuard")) else if (fastcmp(field,"oldguard"))
lua_pushinteger(L, plr->oldGuard); lua_pushinteger(L, plr->oldGuard);
else if (fastcmp(field,"preventfailsafe")) else if (fastcmp(field,"preventfailsafe"))
lua_pushinteger(L, plr->preventfailsafe); lua_pushinteger(L, plr->preventfailsafe);
else if (fastcmp(field,"tripwireUnstuck")) else if (fastcmp(field,"tripwireunstuck"))
lua_pushinteger(L, plr->tripwireUnstuck); lua_pushinteger(L, plr->tripwireUnstuck);
/* /*
else if (fastcmp(field,"itemroulette")) else if (fastcmp(field,"itemroulette"))
@ -453,11 +453,11 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->lastjawztarget); lua_pushinteger(L, plr->lastjawztarget);
else if (fastcmp(field,"jawztargetdelay")) else if (fastcmp(field,"jawztargetdelay"))
lua_pushinteger(L, plr->jawztargetdelay); lua_pushinteger(L, plr->jawztargetdelay);
else if (fastcmp(field,"confirmVictim")) else if (fastcmp(field,"confirmvictim"))
lua_pushinteger(L, plr->confirmVictim); lua_pushinteger(L, plr->confirmVictim);
else if (fastcmp(field,"confirmVictimDelay")) else if (fastcmp(field,"confirmvictimdelay"))
lua_pushinteger(L, plr->confirmVictimDelay); lua_pushinteger(L, plr->confirmVictimDelay);
else if (fastcmp(field,"glanceDir")) else if (fastcmp(field,"glancedir"))
lua_pushinteger(L, plr->glanceDir); lua_pushinteger(L, plr->glanceDir);
else if (fastcmp(field,"trickpanel")) else if (fastcmp(field,"trickpanel"))
lua_pushinteger(L, plr->trickpanel); lua_pushinteger(L, plr->trickpanel);
@ -469,9 +469,9 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->trickboostdecay); lua_pushinteger(L, plr->trickboostdecay);
else if (fastcmp(field,"trickboost")) else if (fastcmp(field,"trickboost"))
lua_pushinteger(L, plr->trickboost); lua_pushinteger(L, plr->trickboost);
else if (fastcmp(field,"dashRingPullTics")) else if (fastcmp(field,"dashringpulltics"))
lua_pushinteger(L, plr->dashRingPullTics); lua_pushinteger(L, plr->dashRingPullTics);
else if (fastcmp(field,"dashRingPushTics")) else if (fastcmp(field,"dashringpushtics"))
lua_pushinteger(L, plr->dashRingPushTics); lua_pushinteger(L, plr->dashRingPushTics);
else if (fastcmp(field,"roundscore")) else if (fastcmp(field,"roundscore"))
lua_pushinteger(L, plr->roundscore); lua_pushinteger(L, plr->roundscore);
@ -655,13 +655,13 @@ static int player_get(lua_State *L)
lua_pushboolean(L, plr->bot); lua_pushboolean(L, plr->bot);
else if (fastcmp(field,"jointime")) else if (fastcmp(field,"jointime"))
lua_pushinteger(L, plr->jointime); lua_pushinteger(L, plr->jointime);
else if (fastcmp(field,"spectatorReentry")) else if (fastcmp(field,"spectatorreentry"))
lua_pushinteger(L, plr->spectatorReentry); lua_pushinteger(L, plr->spectatorReentry);
else if (fastcmp(field,"griefValue")) else if (fastcmp(field,"griefvalue"))
lua_pushinteger(L, plr->griefValue); lua_pushinteger(L, plr->griefValue);
else if (fastcmp(field,"griefStrikes")) else if (fastcmp(field,"griefstrikes"))
lua_pushinteger(L, plr->griefStrikes); lua_pushinteger(L, plr->griefStrikes);
else if (fastcmp(field,"griefWarned")) else if (fastcmp(field,"griefwarned"))
lua_pushinteger(L, plr->griefWarned); lua_pushinteger(L, plr->griefWarned);
else if (fastcmp(field,"splitscreenindex")) else if (fastcmp(field,"splitscreenindex"))
lua_pushinteger(L, plr->splitscreenindex); lua_pushinteger(L, plr->splitscreenindex);
@ -671,7 +671,7 @@ static int player_get(lua_State *L)
#endif #endif
else if (fastcmp(field,"ping")) else if (fastcmp(field,"ping"))
lua_pushinteger(L, playerpingtable[( plr - players )]); lua_pushinteger(L, playerpingtable[( plr - players )]);
else if (fastcmp(field, "public_key")) else if (fastcmp(field, "publickey"))
lua_pushstring(L, GetPrettyRRID(plr->public_key, false)); lua_pushstring(L, GetPrettyRRID(plr->public_key, false));
else { else {
lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS); lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS);
@ -787,19 +787,19 @@ static int player_set(lua_State *L)
plr->spinouttimer = luaL_checkinteger(L, 3); plr->spinouttimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"instashield")) else if (fastcmp(field,"instashield"))
plr->instashield = luaL_checkinteger(L, 3); plr->instashield = luaL_checkinteger(L, 3);
else if (fastcmp(field,"nullHitlag")) else if (fastcmp(field,"nullhitlag"))
plr->nullHitlag = luaL_checkinteger(L, 3); plr->nullHitlag = luaL_checkinteger(L, 3);
else if (fastcmp(field,"wipeoutslow")) else if (fastcmp(field,"wipeoutslow"))
plr->wipeoutslow = luaL_checkinteger(L, 3); plr->wipeoutslow = luaL_checkinteger(L, 3);
else if (fastcmp(field,"justbumped")) else if (fastcmp(field,"justbumped"))
plr->justbumped = luaL_checkinteger(L, 3); plr->justbumped = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tumbleBounces")) else if (fastcmp(field,"tumblebounces"))
plr->tumbleBounces = luaL_checkinteger(L, 3); plr->tumbleBounces = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tumbleHeight")) else if (fastcmp(field,"tumbleheight"))
plr->tumbleHeight = luaL_checkinteger(L, 3); plr->tumbleHeight = luaL_checkinteger(L, 3);
else if (fastcmp(field,"justDI")) else if (fastcmp(field,"justdi"))
plr->justDI = luaL_checkinteger(L, 3); plr->justDI = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flipDI")) else if (fastcmp(field,"flipdi"))
plr->flipDI = luaL_checkboolean(L, 3); plr->flipDI = luaL_checkboolean(L, 3);
else if (fastcmp(field,"incontrol")) else if (fastcmp(field,"incontrol"))
plr->incontrol = luaL_checkinteger(L, 3); plr->incontrol = luaL_checkinteger(L, 3);
@ -831,9 +831,9 @@ static int player_set(lua_State *L)
plr->driftboost = luaL_checkinteger(L, 3); plr->driftboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"strongdriftboost")) else if (fastcmp(field,"strongdriftboost"))
plr->strongdriftboost = luaL_checkinteger(L, 3); plr->strongdriftboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"gateBoost")) else if (fastcmp(field,"gateboost"))
plr->gateBoost = luaL_checkinteger(L, 3); plr->gateBoost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"gateSound")) else if (fastcmp(field,"gatesound"))
plr->gateSound = luaL_checkinteger(L, 3); plr->gateSound = luaL_checkinteger(L, 3);
else if (fastcmp(field,"aizdriftstraft")) else if (fastcmp(field,"aizdriftstraft"))
plr->aizdriftstrat = luaL_checkinteger(L, 3); plr->aizdriftstrat = luaL_checkinteger(L, 3);
@ -859,7 +859,7 @@ static int player_set(lua_State *L)
plr->spindashboost = luaL_checkinteger(L, 3); plr->spindashboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"fastfall")) else if (fastcmp(field,"fastfall"))
plr->fastfall = luaL_checkfixed(L, 3); plr->fastfall = luaL_checkfixed(L, 3);
else if (fastcmp(field,"fastfallBase")) else if (fastcmp(field,"fastfallbase"))
plr->fastfallBase = luaL_checkfixed(L, 3); plr->fastfallBase = luaL_checkfixed(L, 3);
else if (fastcmp(field,"numboosts")) else if (fastcmp(field,"numboosts"))
plr->numboosts = luaL_checkinteger(L, 3); plr->numboosts = luaL_checkinteger(L, 3);
@ -879,13 +879,13 @@ static int player_set(lua_State *L)
plr->draftleeway = luaL_checkinteger(L, 3); plr->draftleeway = luaL_checkinteger(L, 3);
else if (fastcmp(field,"lastdraft")) else if (fastcmp(field,"lastdraft"))
plr->lastdraft = luaL_checkinteger(L, 3); plr->lastdraft = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwireState")) else if (fastcmp(field,"tripwirestate"))
plr->tripwireState = luaL_checkinteger(L, 3); plr->tripwireState = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwirePass")) else if (fastcmp(field,"tripwirepass"))
plr->tripwirePass = luaL_checkinteger(L, 3); plr->tripwirePass = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwireLeniency")) else if (fastcmp(field,"tripwireleniency"))
plr->tripwireLeniency = luaL_checkinteger(L, 3); plr->tripwireLeniency = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwireReboundDelay")) else if (fastcmp(field,"tripwirerebounddelay"))
plr->tripwireReboundDelay = luaL_checkinteger(L, 3); plr->tripwireReboundDelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"wavedash")) else if (fastcmp(field,"wavedash"))
plr->wavedash = luaL_checkinteger(L, 3); plr->wavedash = luaL_checkinteger(L, 3);
@ -907,19 +907,19 @@ static int player_set(lua_State *L)
plr->lastsafelap = luaL_checkinteger(L, 3); plr->lastsafelap = luaL_checkinteger(L, 3);
else if (fastcmp(field,"lastsafecheatcheck")) else if (fastcmp(field,"lastsafecheatcheck"))
plr->lastsafecheatcheck = luaL_checkinteger(L, 3); plr->lastsafecheatcheck = luaL_checkinteger(L, 3);
else if (fastcmp(field,"topAccel")) else if (fastcmp(field,"topaccel"))
plr->topAccel = luaL_checkinteger(L, 3); plr->topAccel = luaL_checkinteger(L, 3);
else if (fastcmp(field,"instaWhipCharge")) else if (fastcmp(field,"instawhipcharge"))
plr->instaWhipCharge = luaL_checkinteger(L, 3); plr->instaWhipCharge = luaL_checkinteger(L, 3);
else if (fastcmp(field,"pitblame")) else if (fastcmp(field,"pitblame"))
plr->pitblame = luaL_checkinteger(L, 3); plr->pitblame = luaL_checkinteger(L, 3);
else if (fastcmp(field,"defenseLockout")) else if (fastcmp(field,"defenselockout"))
plr->defenseLockout = luaL_checkinteger(L, 3); plr->defenseLockout = luaL_checkinteger(L, 3);
else if (fastcmp(field,"oldGuard")) else if (fastcmp(field,"oldguard"))
plr->oldGuard = luaL_checkinteger(L, 3); plr->oldGuard = luaL_checkinteger(L, 3);
else if (fastcmp(field,"preventfailsafe")) else if (fastcmp(field,"preventfailsafe"))
plr->preventfailsafe = luaL_checkinteger(L, 3); plr->preventfailsafe = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwireUnstuck")) else if (fastcmp(field,"tripwireunstuck"))
plr->tripwireUnstuck = luaL_checkinteger(L, 3); plr->tripwireUnstuck = luaL_checkinteger(L, 3);
/* /*
else if (fastcmp(field,"itemroulette")) else if (fastcmp(field,"itemroulette"))
@ -997,11 +997,11 @@ static int player_set(lua_State *L)
plr->lastjawztarget = luaL_checkinteger(L, 3); plr->lastjawztarget = luaL_checkinteger(L, 3);
else if (fastcmp(field,"jawztargetdelay")) else if (fastcmp(field,"jawztargetdelay"))
plr->jawztargetdelay = luaL_checkinteger(L, 3); plr->jawztargetdelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"confirmVictim")) else if (fastcmp(field,"confirmvictim"))
plr->confirmVictim = luaL_checkinteger(L, 3); plr->confirmVictim = luaL_checkinteger(L, 3);
else if (fastcmp(field,"confirmVictimDelay")) else if (fastcmp(field,"confirmvictimdelay"))
plr->confirmVictimDelay = luaL_checkinteger(L, 3); plr->confirmVictimDelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"glanceDir")) else if (fastcmp(field,"glancedir"))
plr->glanceDir = luaL_checkinteger(L, 3); plr->glanceDir = luaL_checkinteger(L, 3);
else if (fastcmp(field,"trickpanel")) else if (fastcmp(field,"trickpanel"))
plr->trickpanel = luaL_checkinteger(L, 3); plr->trickpanel = luaL_checkinteger(L, 3);
@ -1013,9 +1013,9 @@ static int player_set(lua_State *L)
plr->trickboostdecay = luaL_checkinteger(L, 3); plr->trickboostdecay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"trickboost")) else if (fastcmp(field,"trickboost"))
plr->trickboost = luaL_checkinteger(L, 3); plr->trickboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"dashRingPullTics")) else if (fastcmp(field,"dashringpulltics"))
plr->dashRingPullTics = luaL_checkinteger(L, 3); plr->dashRingPullTics = luaL_checkinteger(L, 3);
else if (fastcmp(field,"dashRingPushTics")) else if (fastcmp(field,"dashringpushtics"))
plr->dashRingPushTics = luaL_checkinteger(L, 3); plr->dashRingPushTics = luaL_checkinteger(L, 3);
else if (fastcmp(field,"roundscore")) else if (fastcmp(field,"roundscore"))
plr->roundscore = luaL_checkinteger(L, 3); plr->roundscore = luaL_checkinteger(L, 3);
@ -1194,13 +1194,13 @@ static int player_set(lua_State *L)
return NOSET; return NOSET;
else if (fastcmp(field,"jointime")) else if (fastcmp(field,"jointime"))
return NOSET; return NOSET;
else if (fastcmp(field,"spectatorReentry")) else if (fastcmp(field,"spectatorreentry"))
plr->spectatorReentry = (UINT32)luaL_checkinteger(L, 3); plr->spectatorReentry = (UINT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"griefValue")) else if (fastcmp(field,"griefvalue"))
plr->griefValue = (UINT32)luaL_checkinteger(L, 3); plr->griefValue = (UINT32)luaL_checkinteger(L, 3);
else if (fastcmp(field,"griefStrikes")) else if (fastcmp(field,"griefstrikes"))
plr->griefStrikes = (UINT8)luaL_checkinteger(L, 3); plr->griefStrikes = (UINT8)luaL_checkinteger(L, 3);
else if (fastcmp(field,"griefWarned")) else if (fastcmp(field,"griefwarned"))
plr->griefWarned = luaL_checkinteger(L, 3); plr->griefWarned = luaL_checkinteger(L, 3);
else if (fastcmp(field,"splitscreenindex")) else if (fastcmp(field,"splitscreenindex"))
return NOSET; return NOSET;