23 Commits

Author SHA1 Message Date
Aaron Suen
11438a1625 Deprecate ent_prop_set() method 2020-05-25 11:43:51 -04:00
Aaron Suen
afa36f1236 Standardize obj property setting.
This should more reliably minimize network traffic
incurred by excess property setting.

We could probably standardize a few more things,
like set attach, anim, yaw, pos...
2020-03-25 09:20:37 -04:00
Aaron Suen
65f3993272 Auto-sprint and player movement overhaul.
- Players start out at a brisk walk, accelerate to a run
  if moving continuously forward.
- Clean up and consolidate various player movement
  code, including footsteps, freefall, and zoom focus.
2020-01-25 09:08:13 -05:00
Aaron Suen
25f4a19761 Let's try another walking speed buff.
Walking is a big part of gameplay, and builds tend to be
big and clunky; this will shave of a bit of the boredom.
2020-01-24 21:05:42 -05:00
Aaron Suen
95bef1c074 Attempt to fix zoom focus mechanic... 2020-01-23 21:49:29 -05:00
Aaron Suen
42c8e21cd2 Experimental zoom control.
Player can zoom in more by standing still and holding sneak.
2020-01-23 21:07:02 -05:00
Aaron Suen
d7819762e5 Full proper support for spectator mods.
If players are invisible, NodeCore will not add any visible or
audible effects for them, allowing such players to be completely
non-interactive with gameplay.

This allows things like spectator or stealth-admin mods to
function properly.
2019-12-11 06:52:09 -05:00
Aaron Suen
dc8c483e01 Standardize virtual items, prevent them dropping. 2019-12-09 04:46:33 -05:00
Aaron Suen
78e4008aac Make players non-pointable for now.
Direct PvP is not (yet) a meaningful thing in NodeCore,
so there's no real benefit to targeting a player with a
tool.  However, having players be pointable CAN cause
issues with spectators blocking the selection path of
legit players in multiplayer.  This allows players to dig
around such spectators, and other players.

Players are not really "of the world" so this makes a
certain kind of sense...
2019-11-29 19:28:15 -05:00
Aaron Suen
a12d44c4f8 Tighten up interact checks. 2019-11-28 08:55:09 -05:00
Aaron Suen
a634777ecd Fix non-interact players dropping injuries. 2019-11-25 21:14:22 -05:00
Aaron Suen
bd3246c16c Non-interacting players have no inventory either.
Consistent with removal of the arms and wield hud,
remove the hotbar HUD and dump all inventory items
on the ground at time of revocation, if necessary.
2019-11-25 20:36:13 -05:00
Aaron Suen
9e20b3ce66 Sneaking actually makes player make less sound. 2019-09-09 08:11:06 -04:00
Aaron Suen
fe2c153f9e Clean up all lua code style.
Formatting rules based on Paul Kulchenko's perl-based formatter...
http://notebook.kulchenko.com/programming/lua-beautifier-in-55-lines-of-perl
...using a single tab for indent.

Mostly pure whitespace changes.
2019-08-27 19:14:51 -04:00
Aaron Suen
da7eae09cd Disable the now-long-useless /kill command. 2019-08-27 07:33:38 -04:00
Aaron Suen
5f277cfad1 Switch to hard-coded list names.
It seems that inv:get_lists() returns a list of userdata, instead
of names, at least in 5.0+, and can't necessarily be relied upon
for this purpose.
2019-04-10 08:33:34 -04:00
Aaron Suen
db5cbd3de4 Avoid lighting bugs, players messing w/ inventory via CSM. 2019-04-09 21:06:55 -04:00
Aaron Suen
b7372fd05d Eliminate all non-main inventory lists. 2019-04-06 20:49:27 -04:00
Aaron Suen
c83e3288d7 stepheight obsoleted by auto-jumping...?
Well, we'll have to see if that works out...
2019-03-29 23:53:27 -04:00
Aaron Suen
4d0f0734ba Beginning of a bold new health system.
- Eliminate health and breath stat bars.
- Players NO LONGER DIE FROM INJURY.
- Players no longer lose walking speed or mobility.
- Players lose inventory slots in proportion to injury; they're
  stuffed with an "injury" item, and items they displace are
  ejected.  Slots are displaced in random order.
- Healing rate is much faster, so players are usually mildly
  inconvenienced by injury, but can soon enough pick up their
  stuff and leave.
- Health and breath HUDs are gone.  Health is visible based on
  number of lost slots, and breath uses a vignette to narrow
  tunnel vision for O2 loss.

Overall, the old health system has been more of an immersion-
breaking annoyance than anything.  This allows health to get out
of the way of the primary gameplay.

UNFINISHED: Need a replacement for the old "suicide to get unstuck"
mechanic.
2019-03-10 15:47:22 -04:00
Aaron Suen
cbb7f823c3 Fix node dig prediction, allow limited zoom. 2019-03-07 10:08:22 -05:00
Aaron Suen
b012fd2356 Change item "desperate" placement logic.
Avoid above-grade placement, but randomly allow it, allowing
items that are "stuck" in a pile of leaves to gradually
random-walk their way out into a stable position.
2019-03-06 22:07:18 -05:00
Aaron Suen
3b08a8ee9a Documentation updates, new player guide interface.
Also restructured the player_inv/player_setup thing AGAIN.
Now setup is all rules and inv is all interface.
2019-03-05 19:20:38 -05:00