Skip to content

Commit

Permalink
Merge branch 'next' into public_next
Browse files Browse the repository at this point in the history
  • Loading branch information
ninesphere committed May 16, 2023
2 parents f114761 + b99ecde commit e086d57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lua_baselib.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ static int lib_pGetClosestAxis(lua_State *L)

static int lib_pSpawnParaloop(lua_State *L)
{
mobj_t *ptmthing = tmthing;
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
fixed_t z = luaL_checkfixed(L, 3);
Expand All @@ -890,6 +891,7 @@ static int lib_pSpawnParaloop(lua_State *L)
if (nstate >= NUMSTATES)
return luaL_error(L, "state %d out of range (0 - %d)", nstate, NUMSTATES-1);
P_SpawnParaloop(x, y, z, radius, number, type, nstate, rotangle, spawncenter);
P_SetTarget(&tmthing, ptmthing);
return 0;
}

Expand Down Expand Up @@ -3587,14 +3589,14 @@ static int lib_gAddPlayer(lua_State *L)
char joinmsg[256];

// Truncate bot name
player_names[newplayernum][sizeof(*player_names) - 7] = '\0'; // The length of colored [BOT] + 1
player_names[newplayernum][sizeof(*player_names) - 8] = '\0'; // The length of colored [BOT] + 1

strcpy(joinmsg, M_GetText("\x82*Bot %s has joined the game (player %d)"));
strcpy(joinmsg, va(joinmsg, player_names[newplayernum], newplayernum));
HU_AddChatText(joinmsg, false);

// Append blue [BOT] tag at the end
strlcat(player_names[newplayernum], "\x84[BOT]", sizeof(*player_names));
strlcat(player_names[newplayernum], "\x84[BOT]\x80", sizeof(*player_names));
}

LUA_PushUserdata(L, newplayer, META_PLAYER);
Expand Down

0 comments on commit e086d57

Please sign in to comment.