mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch '22-merge-again' into loadbar_plus
This commit is contained in:
commit
c3c5096ca2
4 changed files with 48 additions and 5 deletions
|
|
@ -463,6 +463,42 @@ static inline int lib_getenum(lua_State *L)
|
|||
}
|
||||
return luaL_error(L, "power '%s' could not be found.\n", word);
|
||||
}
|
||||
else if (!mathlib && fastncmp("k_",word,2)) {
|
||||
p = word+2;
|
||||
for (i = 0; i < NUMKARTSTUFF; i++)
|
||||
if (fasticmp(p, KARTSTUFF_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (mathlib && fastncmp("K_",word,2)) { // SOCs are ALL CAPS!
|
||||
p = word+2;
|
||||
for (i = 0; i < NUMKARTSTUFF; i++)
|
||||
if (fastcmp(p, KARTSTUFF_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return luaL_error(L, "kartstuff '%s' could not be found.\n", word);
|
||||
}
|
||||
else if (!mathlib && fastncmp("khud_",word,5)) {
|
||||
p = word+5;
|
||||
for (i = 0; i < NUMKARTHUD; i++)
|
||||
if (fasticmp(p, KARTHUD_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (mathlib && fastncmp("KHUD_",word,5)) { // SOCs are ALL CAPS!
|
||||
p = word+5;
|
||||
for (i = 0; i < NUMKARTHUD; i++)
|
||||
if (fastcmp(p, KARTHUD_LIST[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
}
|
||||
return luaL_error(L, "karthud '%s' could not be found.\n", word);
|
||||
}
|
||||
else if (fastncmp("HUD_",word,4)) {
|
||||
p = word+4;
|
||||
for (i = 0; i < NUMHUDITEMS; i++)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ extern const char *const GAMETYPERULE_LIST[];
|
|||
extern const char *const ML_LIST[16]; // Linedef flags
|
||||
extern const char *COLOR_ENUMS[];
|
||||
extern const char *const POWERS_LIST[];
|
||||
extern const char *const KARTSTUFF_LIST[];
|
||||
extern const char *const KARTHUD_LIST[];
|
||||
extern const char *const HUDITEMS_LIST[];
|
||||
extern const char *const MENUTYPES_LIST[];
|
||||
|
||||
|
|
|
|||
10
src/p_mobj.c
10
src/p_mobj.c
|
|
@ -9293,6 +9293,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
P_SetThingPosition(mobj);
|
||||
I_Assert(mobj->subsector != NULL);
|
||||
|
||||
// Make sure scale matches destscale immediately when spawned
|
||||
P_SetScale(mobj, mobj->destscale);
|
||||
|
||||
mobj->floorz = P_GetSectorFloorZAt (mobj->subsector->sector, x, y);
|
||||
mobj->ceilingz = P_GetSectorCeilingZAt(mobj->subsector->sector, x, y);
|
||||
|
||||
|
|
@ -10462,6 +10465,7 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
p->skincolor = skincolor_blueteam;
|
||||
}
|
||||
|
||||
if (leveltime >= introtime)
|
||||
p->powers[pw_flashing] = K_GetKartFlashing(p); // Babysitting deterrent
|
||||
|
||||
mobj = P_SpawnMobj(0, 0, 0, MT_PLAYER);
|
||||
|
|
@ -12038,14 +12042,16 @@ static void P_SetObjectSpecial(mobj_t *mobj)
|
|||
|
||||
static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y, fixed_t z, mobjtype_t i)
|
||||
{
|
||||
fixed_t relativise = FixedDiv(mthing->scale, mapobjectscale);
|
||||
|
||||
mobj_t *mobj = NULL;
|
||||
boolean doangle = true;
|
||||
|
||||
mobj = P_SpawnMobj(x, y, z, i);
|
||||
mobj->spawnpoint = mthing;
|
||||
|
||||
P_SetScale(mobj, FixedMul(mobj->scale, mthing->scale));
|
||||
mobj->destscale = FixedMul(mobj->destscale, mthing->scale);
|
||||
P_SetScale(mobj, FixedMul(mobj->scale, relativise));
|
||||
mobj->destscale = FixedMul(mobj->destscale, relativise);
|
||||
|
||||
if (!P_SetupSpawnedMapThing(mthing, mobj, &doangle))
|
||||
return mobj;
|
||||
|
|
|
|||
|
|
@ -4592,8 +4592,7 @@ void P_PlayerThink(player_t *player)
|
|||
|| player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either.
|
||||
|| (player->respawn.state != RESPAWNST_NONE) // Respawn timer (for drop dash effect)
|
||||
|| (player->pflags & PF_GAMETYPEOVER) // NO CONTEST explosion
|
||||
|| ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0 && player->karmadelay)
|
||||
|| leveltime < starttime)) // Level intro
|
||||
|| ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0 && player->karmadelay)))
|
||||
{
|
||||
if (player->powers[pw_flashing] > 0 && player->powers[pw_flashing] < K_GetKartFlashing(player)
|
||||
&& (leveltime & 1))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue