Commit Graph

154 Commits

Author SHA1 Message Date
dongresource 89eb0b140b Use the right packet for when a player falls out of the world
SUDDEN_DEAD is more appropriate than goo damage for this.
Also made it so other players can see when someone does a /health 0, for
comedic effect.
2021-03-09 21:23:57 +01:00
dongresource ffe5947925 Keep track of sold items so we can validate buyback packets 2021-03-09 16:45:38 +01:00
dongresource 5e569d4324 Disallow selling Croc-Potted items
Also, make sure to explicitly terminate the connection when a player is
kicked, and align a few fields in tables.sql.
2021-03-07 00:38:24 +01:00
Jade d4eaf83354 Fixed Instancing Bugs 2021-01-04 23:53:44 +01:00
dongresource 4516227a7b Fix a few GM issues
* Invert access check when kicking players
* Add validation to ensure only GMs can PVP
* Account for instance in /teleport2me
2021-01-01 21:38:03 +01:00
dongresource a12acbb68f Implement most of the remaining client-side GM commands
* Muting a player's freechat
* Kicking players
* Querying info about a player
* Teleporting yourself to a player
* Teleporting a player to yourself
* Teleporting a player to another player
* Teleporting a player to arbitrary coords
* Teleporting a player to arbitrary coords in an arbitrary mapnum
* /unstick

Also:
* Renamed misleading setSpecialPlayer() to setValuePlayer()
* Revamped monitor logic
* Added server-side checks to account level 50 commands
* Made sure even trade chat is run through sanitizeText()
* Moved setSpecialState() closer to its calling functions
* Interpret client commands even in Buddy and Group chat (but not in
Trade chat)
2020-12-31 12:51:31 +01:00
dongresource c78b3ca69f Do not cancel the ongoing race on recall
Also do not remove the player's vehicle if the player isn't on a
vehicle.
2020-12-31 03:00:54 +01:00
dongresource 55431362a7 Make sure the current race is cleared when leaving an IZ 2020-12-28 18:40:26 +01:00
dongresource 4060bf25b0 Fix recall removing FM pods if racing 2020-12-28 16:55:13 +01:00
kamilprzyb f28c643b48 Allow permanent vehicles 2020-12-23 13:50:12 -05:00
dongresource fcdea2e723 Implement multiple-choice mission rewards 2020-12-23 13:50:12 -05:00
dongresource a99f95d15f Initial Academy support
Support for the Academy's Nano system is complete, but they're not being
saved to the DB yet.
2020-12-23 13:50:12 -05:00
Gent S ea47f67b2b Properly utilize instance data in map info packet 2020-12-21 16:18:08 -05:00
Gent S 91ea8be72e Implement basic race handling 2020-12-21 16:18:08 -05:00
dongresource f7a6615379 Tweak mob roaming logic and a few other values
This fixes the crash with mobs with a very small m_iIdleRange and avoids
unnecessary looping.

Co-authored-by: JadeShrineMaiden <69916714+JadeShrineMaiden@users.noreply.github.com>
2020-12-17 02:35:55 +01:00
Gent S 792a317b48 Indicate high account level in logged player name 2020-12-15 09:53:45 -05:00
dongresource 442d7853a5 In the absence of a Resurrect 'Em in a Lair, respawn at the entrance 2020-12-15 00:26:29 +01:00
Kamil 04112377ea Implement setting for disabling first use tips 2020-12-13 19:51:09 -05:00
Kamil bd3a91e530 Properly implement first use flags 2020-12-13 19:51:09 -05:00
dongresource 811c9d4d5c Stop iterating in exitDuplicate() after having removed a player
This fixes a crash due to the invalidated iterator continuing to loop.
It should be safe to assume there's only ever one duplicate/stale player.

Also updated tdata.
2020-12-08 01:53:21 +01:00
dongresource 8ebabac7c0 Various bugfixes
* Fixed Nano stamina not being halved on respawn
* Reverted the default argument to terminate() change because MSVC is
undable to disambiguate the function pointer passed to sigaction()
* Fatal errors during init (like in TableData) can just call exit(1)
directly anyway (missing "OpenFusion: terminated." be damned)
* Switched to a slightly more portable syntax for getting the version
in the Makefile
* We shouldn't join the shard thread in the signal handler because the
thread the signal handler ends up running in is undefined behaviour and
we don't strictly need to join it anyway

Many of these issues were discovered on OpenBSD.
2020-12-06 05:25:23 +01:00
dongresource fb9c4140b6 Remove redundant namespace specifiers in PlayerManager::init() 2020-12-01 22:24:18 +01:00
dongresource 1e822f7a6c Removed redundant checks for a nullptr from PlayerManager::getPlayer()
These were written in desparation and never should have been there in
the first place.
2020-12-01 21:37:34 +01:00
dongresource c43a3d64fb Removed the Player pointer from CNSocket
It was a leak in the abstraction that we weren't even using that much.
This is technically a de-optimization, but it's okay since it's not a
hot code path.
2020-12-01 21:37:34 +01:00
Jade 5771cd014a Various bugfixes and tweaks
- timed missions of all types should work.
- nanos now transmit an unsummon on 0 stamina.
- dying bumps your nanos down to half stamina now.
- enemies use abilities less frequently.
- group recall now works at any distance.
- passive nanos are tweaked to guzzle less stamina.
- cleared out some redundant stuff at the nanoPower handler.
2020-12-01 13:16:14 -05:00
Jade d2e89851d6 Non-group buffs do not misbehave + Revive nano stamina fix 2020-11-27 15:40:49 -05:00
Jade c343092bd5 Gumball times out for slots 2 & 3 + Tweaks 2020-11-27 12:01:28 -05:00
Jade fe7ec44554 Restructuring, Cleaning up and Bugfixes
* Added findTargets, a new helper function that reads out the packet for targets.
* Restructured and removed leftover redundant code.
2020-11-26 23:01:19 -05:00
Jade 299fc1b461 Refactored Nano Powers
* All nano power functions have been merged into one goliath of a function.
* Nano powers consume the correct amount of stamina.
* Bugfixed gumball issues, gumballed nanos now perform better.
* Revive powers now work correctly.
* Recall powers both self and group are functional.
* Removed nanoBuff.
* Added a new applyBuff function, this allows for quick and easy application of nano skills.
* Numerous other bugfixes.
2020-11-26 23:01:19 -05:00
Gent S 8073c68bd5 Make /fusionmatter properly update fusion matter 2020-11-26 22:33:43 -05:00
Gent S 57060e9b6f Fix spawning in the unknown when no Resurrect 'Ems are nearby 2020-11-26 11:03:42 -05:00
Gent S faf2a0ee7d Fix freefalling after MSS DC 2020-11-26 10:01:48 -05:00
Gent S e3568ea506 Fix viewableChunks memory leaks 2020-11-25 22:49:37 -05:00
Gent S b0aea27418 Fix player revive packet carrying wrong values
Oops
2020-11-25 20:38:48 -05:00
Gent S db98af9775 Fix chunk desync on revive 2020-11-25 17:50:57 -05:00
Gent S 07a1927b9f Force chunk update in sendPlayerTo 2020-11-22 19:22:33 -05:00
Gent S c5fa397724 Fix player entering chunks twice on load 2020-11-21 11:46:56 -05:00
Gent S 95b385dee1 Reimplement chunk data caching 2020-11-19 19:16:51 -05:00
Gent S 82b505a737 Fix buddy warp causing softlock 2020-11-19 18:16:35 -05:00
Gent S dae3b24093 Reimplement chunk position caching 2020-11-19 17:37:07 -05:00
Gent S e50a4c2edd Experimental chunk refactor. 2020-11-19 17:37:02 -05:00
Gent S 5cbb8538c0 Get rid of PlayerView. For good. 2020-11-19 17:36:49 -05:00
Kamil c77f99e849 moved bullets removal call 2020-11-16 21:38:49 -05:00
Kamil 9cee8f2c87 added cleaning up player's bullets on exit 2020-11-16 21:38:49 -05:00
Gent S 8ad3f3aabd CHUNKPOS macro -> ChunkPos typedef 2020-11-16 09:59:53 -05:00
Gent S b22ba781c8 Possible fix for chunking desyncs + CHUNKPOS macro 2020-11-15 14:41:56 -05:00
Kamil 859b24229a added a condition to not send mob/egg _ENTER packet when it's HP is 0 2020-11-11 23:19:07 -05:00
Kamil 674d5112f3 implemented basic eggs functionality 2020-11-11 23:19:07 -05:00
kamilprzyb de99522340 added removing buffs on player exit 2020-11-11 23:19:07 -05:00
Gent 3f5a9c8811 Fix buddy list not syncing properly
I couldn't reproduce this on my public server, but the list would show up empty sometimes on initial login on my local server, so I threw it in for good measure.
2020-11-08 13:58:44 -05:00