Commit Graph

32 Commits

Author SHA1 Message Date
gsemaj
4ec3a3acb7
Replace group filter operator with function 2023-07-11 13:52:52 -04:00
gsemaj
db73b85bc8
Refactor player groups
Group structures are used now. Adds more checks in some places but simplifies things overall.
We can expand this system to entities as well now pretty trivially.
2023-07-11 13:52:52 -04:00
gsemaj
6cab203401
(WIP) EXPERIMENTAL GROUP CHANGES 2023-07-11 13:52:52 -04:00
gsemaj
92846e0eac
(WIP) TODO ABILITIES 2023-07-11 13:52:51 -04:00
gsemaj
5963ea06be
Move mob aggro logic into takeDamage override
God that feels good
2023-07-11 13:52:51 -04:00
gsemaj
c28970f2e1
(WIP) Move away from rigid states/transitions to allow custom behavior 2023-07-11 13:52:51 -04:00
gsemaj
8be853c2dc
EntityType -> EntityKind 2023-07-11 13:52:51 -04:00
gsemaj
a811e73fed
(WIP) onRoamStart hook implementation 2023-07-11 13:52:50 -04:00
gsemaj
7c9038cf10
(WIP) onCombatStart hook implementation 2023-07-11 13:52:50 -04:00
gsemaj
c1e391d86a
(WIP) onDeath hook implementation 2023-07-11 13:52:49 -04:00
gsemaj
e23af08838
(WIP) Add src param to transition + certain hooks
Should all hooks have src? I think not
2023-07-11 13:52:49 -04:00
gsemaj
8a26ae2f01
(WIP) Transitions + hook definitions + onRetreat hook implementation 2023-07-11 13:52:49 -04:00
gsemaj
d17694e12e
(WIP) Point 2: Generalization 2023-07-11 13:52:48 -04:00
gsemaj
4b612f35d2
(WIP) Point 1: step functions 2023-07-11 13:52:48 -04:00
f305d7252d
[refactor] Replace a few uses of magic numbers with enums 2023-07-11 13:52:47 -04:00
gsemaj
703eaff2b4
[WIP] Use EntityRef instead of CNSocket in ability handler 2023-07-11 13:52:46 -04:00
gsemaj
f4f5f2e0bd
[WIP] Replace appearance data with individual fields
Storing certain things in appearance data and others in their own fields
was gross. Now everything is stored on the same level and functions have
been added to generate appearance data when it's needed by the client.
2023-07-11 13:52:45 -04:00
gsemaj
1858938280
[WIP] Rename Entity.type -> Entity.kind 2023-07-11 13:52:45 -04:00
gsemaj
0af8f7e91d
[WIP] Fix Nanos -> Abilities namespace calls 2023-07-11 13:52:45 -04:00
bb4029a9bf Fix invisible group mobs bug
This is a simplified adaptation of
29e7bd25a4f888e9d72fa01f84df98de79f861d1 from Retrobution.

Co-authored-by: Jade <jadeshrinemaiden@gmail.com>
2021-09-19 04:55:10 +02:00
CakeLancelot
aaaf03128a
Don't aggro to players using MSS 2021-09-05 13:23:05 -05:00
gsemaj
e546d3948c [refac] Stop using WarpLocation for coordinates and introduce a Vec3 2021-05-06 12:17:34 -04:00
33ea5af8b7 Added speed to CombatNPC
- Mob's constructor sets speed
- MobAI.cpp now uses mob->speed
2021-04-29 19:20:53 -05:00
FinnHornhoover
78b17aea72 added better drop handling, parsing, rng 2021-04-26 11:26:00 -04:00
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
gsemaj
fd965fbf03 Remove redundant Mob map 2021-04-07 03:03:43 +02:00
65462d01e3 Generalize NPC AI stepping logic
The MobAI::Mobs map still needs to be removed.
2021-03-31 22:28:27 +02:00
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
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
e9bc2fe561 [refactor] Remove the word 'Manager' from most source files/namespaces
ChatManager -> Chat
MissionManager -> Missions
NanoManager -> Nanos
TransportManager -> Transport
ChunkManager -> Chunking
BuddyManager -> Buddies
GroupManager -> Groups
RacingManager -> Racing
ItemManager -> Items

NPCManager and PlayerManager remain.

Note: You can use git log --follow src/file.cpp to trace the history of
a file from before it was renamed.
2021-03-17 20:16:43 +01:00
cee09f6344 [refactor] Mark all internal functions static
All packet handlers and helper functions that are only used in the
source file they're declared in have been taken out of the namespaces in
the corresponding header files, have been marked static, and have been
reordered to avoid the need for declarations at the top of each source
file.

Each source file now contains a "using namespace" directive so that the
static functions don't need to prefix the source file's symbols with
their namespace. All redundant namespace prefixes found have been
removed.

An unused nano power resetting function in NanoManager has been removed.
2021-03-16 22:54:41 +01:00
2024fb4969 [refactor] Split MobManager.cpp into MobAI.cpp and Combat.cpp
This is terrible. It was a mistake to do this before cleaning up the
actual code. It might be better not to use this commit and to do this
refactor in a different order or something.
2021-03-13 23:55:16 +01:00