Commit Graph

1092 Commits

Author SHA1 Message Date
gsemaj 1c3e1d83de Normalize line endings 2021-04-30 04:17:34 -04:00
gsemaj c240cc005f Enforce LF in source through git attributes 2021-04-30 04:01:42 -04:00
CPunch 33ea5af8b7 Added speed to CombatNPC
- Mob's constructor sets speed
- MobAI.cpp now uses mob->speed
2021-04-29 19:20:53 -05:00
CakeLancelot 55f8dc94ce
Update ASAN suppressions 2021-04-26 17:38:29 -05:00
CakeLancelot b99cab58f7 Update vendor directory in .gitattributes and .editorconfig 2021-04-26 17:03:02 -05:00
FinnHornhoover 21e283bedb update drop format 2021-04-26 11:26:00 -04:00
FinnHornhoover 5517a358ea removed eventcratechance config 2021-04-26 11:26:00 -04:00
FinnHornhoover 4eaf3b2f08 altered event drop logic, fixed taro/fm logic 2021-04-26 11:26:00 -04:00
FinnHornhoover 44fd66b511 restored getTime in rand gen 2021-04-26 11:26:00 -04:00
FinnHornhoover 001a0b8d4b removed drop type field in mobs 2021-04-26 11:26:00 -04:00
FinnHornhoover 20b05a72a0 added mob drop id lookup from mob id 2021-04-26 11:26:00 -04:00
FinnHornhoover 78b87d0f61 register altered rarities correcty in rarity roll 2021-04-26 11:26:00 -04:00
FinnHornhoover 527ca817d5 revised getRarity set logic 2021-04-26 11:26:00 -04:00
FinnHornhoover 80b11b4364 removed my "debugger" 2021-04-26 11:26:00 -04:00
FinnHornhoover 6f636b77f2 rarity index fix for egg crates 2021-04-26 11:26:00 -04:00
FinnHornhoover 8a871f7045 merged itemset types and chances, added bypasses 2021-04-26 11:26:00 -04:00
FinnHornhoover 1779d69078 drop format revision 2021-04-26 11:26:00 -04:00
FinnHornhoover 30de9f668c reference fix 2021-04-26 11:26:00 -04:00
FinnHornhoover 78b17aea72 added better drop handling, parsing, rng 2021-04-26 11:26:00 -04:00
CakeLancelot aa028392f0 Fix #205 - if a player times out a race, warp them back to the start 2021-04-25 15:41:39 -05:00
CakeLancelot f0e21b5051 Fix #198 - dismount packet is now sent if unequipping a vehicle 2021-04-24 23:55:13 -05:00
gsemaj 80d965944c Fix naming scheme in NPCs.json 2021-04-24 11:36:33 -04:00
CakeLancelot 2e34440d2e Change the executable working directory for VS to repo root
This fixes config.ini, and the tdata directory not being picked up, so now it launches without closing instantly
2021-04-20 17:17:24 -05:00
CakeLancelot e9709805b7 Mission validation improvements
* Players can no longer complete tasks that aren't in their journal
* Minimum level requirement is now enforced when starting missions
* You can no longer start missions that are already completed
* Implement TASK_START_FAIL for when startTask() returns false
2021-04-20 15:38:51 -05:00
gsemaj fa7c88e214 Rename Vendor.Xpp -> Vendors.Xpp 2021-04-16 13:37:18 -04:00
gsemaj 588e941d3c Fix eggs not entering chunks and add update tabledata 2021-04-16 12:30:22 -04:00
Ege f5600912cb
Update README & logo
Artwork by: https://github.com/egeesin
Commit authored by: https://github.com/egeesin
2021-04-15 13:06:39 -05:00
CakeLancelot fde4a5ff34 Prevent players from collecting the same pod twice in races
Instead of ringCount, there is now a set of all ring IDs collected during the race.

Note: further validation measures are still required to ensure legitimate times/scores
2021-04-13 21:17:21 -05:00
CPunch 9b84d9dc4d [refactor] BaseNPC now uses Entity XYZ fields for handling positions
- fixed many references to Entity.appearanceData.i[XYZ] to use the base Entity XYZ values
- BaseNPC::enterIntoViewOf grabs the position from the base Entity XYZ values
- NPCManager::updateNPCPosition updates the base Entity XYZ values
- MobAI.c/deadStep() also sends it's packet based on the Entity XYZ values
2021-04-13 20:03:51 -05:00
dongresource 48fb510b53 Fix playersInView miscount for dead mobs 2021-04-08 19:25:30 +02:00
gsemaj fd965fbf03 Remove redundant Mob map 2021-04-07 03:03:43 +02:00
dongresource 65462d01e3 Generalize NPC AI stepping logic
The MobAI::Mobs map still needs to be removed.
2021-03-31 22:28:27 +02:00
dongresource 3325397d17 Remove Eggs::Eggs and rearrange Entity members a bit 2021-03-31 22:28:27 +02:00
dongresource 22678fcfc2 Initialize all members of all Entity-derived classes
Also moved some logic out of Mob into CombatNPC.
2021-03-31 22:28:27 +02:00
dongresource 0c8e209360 [WIP] Convert all chunk-related logic to the new system's semantics
Replaced all references to chunk->players and chunk->NPCs with
chunk->entities and all instances of the old NPCClass enum with
EntityType.

The server compiles but will not yet run properly.
2021-03-31 22:28:27 +02:00
dongresource 224ffe05e7 [WIP] Convert most of Chunking to Entity-based system
Player and all NPCs now have a common superclass, with virtual functions
so smooth over shared behavior. EntityRef is a simple class that points
to an arbitrary Entity.

This commit is not yet functional.
2021-03-31 22:28:27 +02:00
dongresource 49f1cb0f00 Fix PC_ATTACK_NPCs not being marked as variadic 2021-03-31 22:27:54 +02:00
CakeLancelot a57953393d [refactor] Convert CNLoginServer handlers to new sendPacket() wrapper
Also remove malformed packet checks, since that is already validated
2021-03-31 21:10:54 +02:00
CakeLancelot b428eb08e9 [refactor] Continue work on switching over to new sendPacket() wrapper
I also moved the give nano GM command to BuiltinCommands, and added a perms check

Haven't checked the following files yet:
Eggs
Groups
Missions
MobAI
2021-03-31 21:10:54 +02:00
CakeLancelot 4a22449f5e [refactor] Switch a bulk of the codebase to the new sendPacket() wrapper
Remaining files to go over:
Nanos
NPCManager
Racing
Trading
Vendors
2021-03-31 21:10:54 +02:00
dongresource 7f9cdfc9ae Use direct members instead of pointers for viewableChunks and buyback
We had avoided putting STL containers into Players back when we thought
Players was still POD and needed to remain POD, but it turned out that
neither were the case all along, so there's no need for the indirection.
2021-03-31 21:10:54 +02:00
dongresource 8afe175bd1 No reason not to include the Academy packet in there 2021-03-31 21:10:54 +02:00
dongresource 0f687cc6b3 [refactor] Remove redundant packet size checks
Done with a vim macro, since I didn't want to bother hacking up a
multi-line deletion script in sed or awk (or Python).
2021-03-31 21:10:54 +02:00
dongresource 55b140f673 [refactor] Initial conversion to new packet handler interfaces
Manually converted PlayerManager, PlayerMovement and a few parts of
Combat to the new system.
2021-03-31 21:10:54 +02:00
dongresource 688f13e649 [refactor] Implement generic, validating sendPacket() wrapper 2021-03-31 21:10:54 +02:00
dongresource ef7d0148c6 [refactor] Validate all inbound packets before handling them 2021-03-31 21:10:54 +02:00
dongresource 7c7d9f1be8 Revert "CNServer::start() now uses an iterator instead of indexing repeatedly"
This change subtly broke the poll() loop when a connection was removed,
because erasing an entry from fds would invalidate the iterator that
was still being used.

This reverts commit ec67cc6527.
2021-03-31 21:07:47 +02:00
CakeLancelot 919c14be0d Include CNStructs in settings.cpp so the ACADEMY define gets picked up 2021-03-20 18:53:22 -05:00
dongresource 124ea33959 Disallow vehicles in non-overworld instances 2021-03-19 02:20:13 +01:00
CPunch 69266d1cda Added Chat and Egg initalizers to main() 2021-03-17 23:46:30 -05:00