diff --git a/LUASTUFF.md b/LUASTUFF.md index 28e77bed8..fcc9f313a 100644 --- a/LUASTUFF.md +++ b/LUASTUFF.md @@ -13,10 +13,12 @@ Mainly for use in visual-only addons like secondcolor. **Not netsafe**. Returns player's current sliptide roll angle, taking sliptideroll cvar value into account. -## hud.setVoteBackground(name) +## hud.setVoteBackground(name[, time\_per\_frame]) Changes vote background texture prefix (game looks for PREFIX + "W" or "C" (depends on resolution) + FRAME\_NUMBER). +If time\_per\_frame is set, each frame will last this amount of tics, default value is 2 + ## hud.add(fn, "vote") and hud.add(fn, "intermission") Hud hooks for vote screen and intermission screen. They only get drawer (`v`) as argument. @@ -120,6 +122,11 @@ v.interpLatch(false) ``` When using a custom string drawer, enable this mode to avoid interpolation artifacting when the string changes. +## cameras[] global array + +Local player cameras that can be accessed outside of hud hooks. +`#cameras` will return amount of available cameras. (0 on dedicated server, 1 with 1 player, 4 with 4p splitscreen, etc) + ## mobj.spritexscale, mobj.spriteyscale, mobj.spritexoffset, mobj.spriteyoffset, mobj.rollangle, mobj.sloperoll, mobj.rollmodel fields Same fields as in SRB2 2.2 diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index a256f69b2..55a475c9d 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -515,7 +515,7 @@ const INT32 checkcoord[12][4] = static boolean R_CheckBBox(const fixed_t *bspcoord) { angle_t angle1, angle2; - INT32 sx1, sx2, boxpos; + INT32 sx1, sx2; const INT32* check; // Find the corners of the box