292 Commits

Author SHA1 Message Date
Aaron Suen
660a1880c6 Fix missing mod.conf 2022-10-30 13:42:11 -04:00
Aaron Suen
7c776fcff9 New mod to automatically prune old players 2022-10-30 13:36:08 -04:00
Aaron Suen
7665c4d26d Guard against player quitting during login process 2022-10-19 23:16:41 -04:00
Aaron Suen
8de5b84e20 Support multiple cinecam "dummy" foci
Instead of always centering on 0,0,0,
support custom waypoints and use of
static_spawn as a default.
2022-10-14 17:53:32 -04:00
Aaron Suen
6a2969578f Show compact xp level w/ SI prefixes 2022-10-07 07:25:14 -04:00
Aaron Suen
850d7f6a9e Hide hidden players in xplevel command too 2022-10-06 22:50:13 -04:00
Aaron Suen
a8410a4d7a Configurable stealthing of online players 2022-10-06 22:47:37 -04:00
Aaron Suen
74f936860c Add API and command for xplevel 2022-10-06 21:20:31 -04:00
Aaron Suen
f2b930f783 Fix player loop early bailout, standardize kickability logic 2022-10-06 07:21:13 -04:00
Aaron Suen
906cf51cbb Trying to fix some issues
- In some cases, players are not being kicked, even though their
  status clearly indicates they should be.  Make sure the "should we
  kick them" logic in the status check command matches the logic in
  the thing that actually does the kick.
- Clean up the way we handle event hooks to reduce the code mess.
- Don't rely on the bump/bumpn functions returning pname; always
  return nil with them and determine pname at the outer layers and
  pass it in as necessary.  This is how we should have fixed the
  earlier bug that caused players digging things not to get the node.
2022-10-06 06:42:06 -04:00
Aaron Suen
52d9932173 Add debug command for szutil_idlekick 2022-10-05 07:47:21 -04:00
Aaron Suen
3ea73b50b5 Fix idlekick never kicking players 2022-10-04 21:35:20 -04:00
Aaron Suen
9e9cd6ca48 Ignore constantly-held controls too
Things like auto-forward or a taped down mining key also count
as "idle" for this system's purposes as well, to avoid players
trivially exploiting to avoid being kicked, or to prevent
false positives caused by stuck controls.
2022-10-04 18:38:17 -04:00
Aaron Suen
fa5ba739cf Ignore very small lookdir movements 2022-10-04 18:35:44 -04:00
Aaron Suen
2468bb73f4 Clear privcache on forced recalc 2022-09-29 23:20:18 -04:00
Aaron Suen
92aaf30496 Run grant callbacks and send grant message 2022-09-29 22:53:59 -04:00
Aaron Suen
0cabcf29bc Use standard string_to_privs in xplevel
This shoudl make xplevel implicitly support roles
2022-09-29 22:05:09 -04:00
Aaron Suen
a015e47dbe New experimental szutil_xplevel mod 2022-09-29 22:02:27 -04:00
Aaron Suen
12f4fc4f15 Move cinecam config into settings
Instead of using mod_storage and privs to control
cinecam, just use settings.  The priv checks every
globalstep per player, in particular, were expensive,
and using "/grantme all" with the mod installed
would cause the player to teleport as a camera
player.
2022-09-29 18:09:28 -04:00
Aaron Suen
079c21a58b Don't return player name on craft in idlekick
Apparently this causes games that use engine crafting to replace
the recipe output with an unknown item with the player's name.

Fixes https://gitlab.com/sztest/szutilpack/-/issues/4
2022-07-05 06:44:31 -04:00
Aaron Suen
64f28532f1 Fix and optimize line of sight checks
- Check destination medium against source, since it's possible
  to transition from a fluid to air and raycast will NOT collide
  with the air, causing from-fluid-to-air transitions not to be
  detected.
- Pre-cache fluid medium data for all node defs instead of running
  through logic at runtime.
2022-05-03 07:10:15 -04:00
Aaron Suen
0a9ba9c210 Delay setting watching HUD until set camera 2022-04-30 14:15:20 -04:00
Aaron Suen
9a4c3550b1 Fine tuning for bottom margin of watching HUD 2022-04-28 21:28:38 -04:00
Aaron Suen
8b9d42646a Re-show the "watching" HUD periodically 2022-04-27 15:43:29 -04:00
Aaron Suen
6c3a0d1859 Fix saving settings across restarts 2022-04-25 22:45:34 -04:00
Aaron Suen
586e592552 Separately configurable height 2022-04-25 22:43:39 -04:00
Aaron Suen
9de0f9ceec Prefer the camera over the shoulder
Bias camera to behind the player's looking dir
so we see things more from the player's
perspective so we can see what they're doing.
2022-04-25 22:40:16 -04:00
Aaron Suen
65a624096a Fix HUD, runtime-configurable settings 2022-04-25 22:36:45 -04:00
Aaron Suen
59af87466e Clearer, better-proportioned image 2022-04-24 21:09:07 -04:00
Aaron Suen
bafddf2bf6 Allow display dimming/vignette
Deeper dimming/vignette when server is empty
to make it a little more visually interesting, plus
add a clearer indication that the server is in
a different state than normal play.
2022-04-24 21:03:36 -04:00
Aaron Suen
65ad490837 Extract settings, narrow assumed FOV
Assume that the FOV might be as narrow as 72.
2022-04-22 21:32:06 -04:00
Aaron Suen
7ae04eb463 Show caption for longer
People aren't necessarily going to be expecting
it so may need more time to read it.
2022-04-22 00:47:47 -04:00
Aaron Suen
fd41bd6a52 Fix reshowing caption on same player
If only one player is online and they are idling in
darkness, it makes the "Watching: " caption show
up too frequently.  Instead, only show the caption
when we change to a different player.
2022-04-22 00:09:27 -04:00
Aaron Suen
2f3985f1d3 Permission to exempt players from MOTD 2022-04-21 23:40:29 -04:00
Aaron Suen
32131b820d Explicitly allow ignores 2022-04-20 20:28:17 -04:00
Aaron Suen
23bfae11fd More cautious allow check that also allows water placement 2022-04-20 07:58:23 -04:00
Aaron Suen
3bc06c5118 Try moving player after setting lookdir
See if we can get rid of that one step worth of jank after
moving the player before their lookdir is set correctly, which
might be due to the delay involved in the work of moving the
player's position.
2022-04-20 07:35:01 -04:00
Aaron Suen
b001ce7b36 Standardize target cycling time 2022-04-20 07:33:31 -04:00
Aaron Suen
744be01ae0 Add dummycam, stay inside airlikes
If no player is connected, just show random views around "spawn"
(the origin for now, not actually testing to find the real spawn
location or honoring static_spawn setting yet) every ~10s.

Make sure the camera is never placed inside a solid; if it is,
then it needs to be moved immediately.
2022-04-20 07:29:26 -04:00
Aaron Suen
66df91ced7 Don't shuffle camera order
This leads to uneven times between cycling to
a particular player; it's probably best to just use
the naive order and let players rotate through
deterministically.

This was especially noticeable when a player
was last in the queue and then first in the next
queue, so you'd see a "Watching: ..." HUD
announcement but no actual change in perspective
and the player would just run twice as long.
2022-04-19 20:39:57 -04:00
Aaron Suen
09ca6f0c89 Allow certain players to be ignored for restarts 2022-04-19 19:34:09 -04:00
Aaron Suen
a27fc1e13d Add a "watching:" HUD 2022-04-19 19:25:57 -04:00
Aaron Suen
8ad44fcd15 Fix wrong mod name 2022-04-18 23:52:03 -04:00
Aaron Suen
cf489835cf Fix code formatting issue 2022-04-18 23:46:45 -04:00
Aaron Suen
47f89855ed Add new WIP "cinematic camera" mod 2022-04-18 23:46:36 -04:00
Aaron Suen
c09272b39d Fix DM beeps w/ new translation 2022-04-01 13:08:12 -04:00
Aaron Suen
9664255b3e Fix broken server status line in 5.5+ 2022-02-18 00:12:43 -05:00
Aaron Suen
159ede89d4 Fix special case of :00 countdown
Should not happen anymore, but just in case.
2022-01-26 22:02:50 -05:00
Aaron Suen
f54dc14dd9 Fix graceless uptime-based restarts
Make sure to trigger the restart countdown before
the uptime limit to make sure there's enough time
for the grace period countdown before the restart.
2022-01-26 22:01:18 -05:00
Aaron Suen
1a550952a7 Fix mis-restoring interact privs on unwatch
Apparently {interact=false} grants the interact
priv, it needs to actually be nil (i.e. key absent)
to not grant interact.
2022-01-23 20:56:02 -05:00