Commit Graph

605 Commits

Author SHA1 Message Date
Aaron Kimbrell
1a74c028c2
fix: make vanity npc's use default equipment if none is specified (#1116) 2023-06-16 16:09:46 -05:00
David Markowitz
be17d1a467 Update DestroyableComponent.cpp 2023-06-16 02:02:33 -07:00
David Markowitz
a992a28088 Merge from upstream 2023-06-16 02:01:01 -07:00
David Markowitz
891648288a Organize Entity header
Probably the third or fourth pass of this darn header...  Just keep making it better every time
Rename some functions to make more sense to a reader
Use different method for Observing/subscribing to component events
Get rid of abomination of overloading GetParentUser
2023-06-16 01:56:02 -07:00
David Markowitz
92006123b8 Another consistency pass
- change NotifyObject to use u16 string
- move stuff to header that is inline
- use u16strings instead of converting to u16 string
- move entity to dEntity
2023-06-16 01:01:13 -07:00
David Markowitz
9a9b9aa813 Merge branch 'components-wheeeee' of https://github.com/DarkflameUniverse/DarkflameServer into components-wheeeee 2023-06-15 23:58:59 -07:00
David Markowitz
ea975965ca Fix typo 2023-06-15 23:58:39 -07:00
EmosewaMC
35e5d8497b Remove empty destructors 2023-06-15 02:32:30 -07:00
EmosewaMC
4d57eff946 Update includes 2023-06-15 02:28:27 -07:00
EmosewaMC
2a8f40f8e8 Finish file 2023-06-15 02:13:25 -07:00
EmosewaMC
355f4f4df8 Update Entity.cpp 2023-06-14 23:17:30 -07:00
EmosewaMC
451f7e76d7 switch to unique_ptrs for callback timers 2023-06-14 23:16:31 -07:00
EmosewaMC
83065dfb6f I havent checked if this compiled 2023-06-14 19:01:31 -07:00
David Markowitz
2a0f63c0a1
Fix all smashables not playing animations (#1112)
Fixes an issue where most smashables did not explode into bricks upon death.  This included anything that was spawned or didnt have the flag is_smashable set.
Tested that in races, all objects smash into bricks
Tested that the player properly explodes in their car if they crash
Tested that Shooting Gallery plays the special smash animation when a ship is smashed
Tested that all spawned objects play smash animations

* Fix warning, Fix modular assembly not smashing

* Rename variable to correct name
2023-06-14 15:44:22 -07:00
Aaron Kimbre
fdd98ab825 fix other script calls 2023-06-13 22:01:51 -05:00
David Markowitz
31be1fbe4c remove script stuff 2023-06-13 19:55:27 -07:00
David Markowitz
d8e2e92428 use get 2023-06-13 19:47:14 -07:00
Aaron Kimbre
e389a619ad update heirarchy 2023-06-13 10:31:39 -05:00
David Markowitz
45bcc80a1b doesnt compile 2023-06-12 15:32:46 -07:00
David Markowitz
b2fee29ee0 Better log and comment 2023-06-12 04:37:38 -07:00
David Markowitz
326c495776 Use more clear control paths 2023-06-12 04:27:14 -07:00
David Markowitz
d224a86e93 Use only 1 script component per Entity
Serialization won't make sense if we allow two of the same component like that
2023-06-12 04:13:06 -07:00
David Markowitz
f9ac0a9dec few more pointer specifiers 2023-06-12 04:04:45 -07:00
David Markowitz
3f3810519d Extra * on one auto 2023-06-12 04:01:45 -07:00
David Markowitz
5be9146662 Specify auto ptr 2023-06-12 04:00:44 -07:00
David Markowitz
262b6ebb58 Remove old Entity Initialize 2023-06-12 03:55:07 -07:00
David Markowitz
6f38a150d3 Minor formatting change 2023-06-12 03:47:57 -07:00
David Markowitz
36c44ecc83 Fully re-implemented initialize 2023-06-12 01:29:43 -07:00
David Markowitz
fc719cbb0a Comment out done code 2023-06-11 04:46:22 -07:00
David Markowitz
f78ea1bbc9 whitespace and comments in quickbuild 2023-06-11 04:40:19 -07:00
David Markowitz
b43e5c2165 doesnt have a component 2023-06-11 04:39:28 -07:00
David Markowitz
5f139c75e0 Quickbuild and Destroyable reintegration 2023-06-11 04:37:53 -07:00
David Markowitz
77dc6ff312 Continued re-integration of Entity::Initialize 2023-06-11 03:06:18 -07:00
David Markowitz
0b5df9f0b1 Destroyable 2023-06-10 05:10:00 -07:00
David Markowitz
b91f84d884 Collectible, Item, further re-implement initialize 2023-06-10 04:46:48 -07:00
David Markowitz
cebe3c732a Update to actually work with component list 2023-06-10 00:14:20 -07:00
David Markowitz
5714ac558e Use std algorithms 2023-06-10 00:03:07 -07:00
David Markowitz
2a2799793d More robust tests 2023-06-09 23:05:44 -07:00
David Markowitz
1c23f3c030 Add test for component Whitelists 2023-06-09 23:02:28 -07:00
Aaron Kimbre
a68fa69e7a Rename RebuildComponent to QuickbuildComponent 2023-06-09 17:12:57 -05:00
David Markowitz
ddc5f0e117 Merge branch 'main' into components-wheeeee 2023-06-09 04:05:55 -07:00
David Markowitz
e3a716a9cf Further re-implement Entity::Initialize
wheee
2023-06-09 04:05:04 -07:00
David Markowitz
0b37dc1e4d Update includes for propertyEnteranceComponent
Class must be complete to be used in a MoveAssignment
2023-06-09 04:03:58 -07:00
David Markowitz
f2d28cc0bd Update CMakeLists.txt 2023-06-09 04:02:45 -07:00
David Markowitz
5da776a084 Add blank classes for some Components
Racing Stats

Minigame Control
2023-06-09 04:02:40 -07:00
David Markowitz
6f057204be Rename some variables
- Add order for loading Components
- Enforce all components have Entity* in the first argument
2023-06-09 02:46:01 -07:00
David Markowitz
f555ba8c25 Rename from GetOwningEntity to GetParentEntity 2023-06-09 01:28:01 -07:00
David Markowitz
e2dfa1809d Replace all auto with auto*
For components
2023-06-09 01:27:05 -07:00
David Markowitz
62aa863997 Remove shared pointer, ODR of componentType variable 2023-06-09 01:22:45 -07:00
EmosewaMC
ec00f5fd9d holy mother of const
Use const everywhere that makes sense
return const variables when it makes sense
const functions and variables again, where it makes sense
No raw access and modifications to protected members
Move template definitions to tcc file

idk how I feel about this one
2023-06-09 01:04:42 -07:00
Aaron Kimbre
d11e2db887 update component names, document heirarchy 2023-06-08 10:29:17 -05:00
David Markowitz
9e9e4dc087 Move to shared pointer 2023-06-07 00:23:50 -07:00
David Markowitz
12d7ab9034
Remove null check in GetPosition (#1109)
Get ready for null pointer errors
2023-06-06 22:48:41 -07:00
David Markowitz
ea9d0d8592 I hope this works 2023-06-06 20:48:30 -07:00
David Markowitz
716a5fcf37 Rename some variables in Component
And add more virtuals
2023-06-06 18:59:53 -07:00
David Markowitz
8ae1e1bc6b
Fix: remove ability to buy items from a vendor if they don't sell said item (#1105) 2023-06-03 00:40:46 -07:00
David Markowitz
1f3df08730 Update GameMessages.cpp 2023-05-13 16:22:13 -07:00
David Markowitz
8a065ad074 Merge remote-tracking branch 'upstream/main' into more-cdclient-cleanup 2023-05-13 16:16:58 -07:00
David Markowitz
4fe335cc66
Refactor: Amf3 implementation (#998)
* Update AMFDeserializeTests.cpp

Redo Amf3 functionality

Overhaul the whole thing due to it being outdated and clunky to use

Sometimes you want to keep the value

Update AMFDeserializeTests.cpp

* Fix enum and constructors

Correct enum to a class and simplify names.
Add a proper default constructor

* Update MasterServer.cpp

* Fix bugs and add more tests

* Refactor: AMF with templates in mind

- Remove hard coded bodge
- Use templates and generics to allow for much looser typing and strengthened implementation
- Move code into header only implementation for portability

Refactor: Convert AMF implementation to templates

- Rip out previous implementation
- Remove all extraneous terminology
- Add proper overloads for all types of inserts
- Fix up tests and codebase

* Fix compiler errors

* Check for null first

* Add specialization for const char*

* Update tests for new template specialization

* Switch BitStream to use references

* Rename files

* Check enum bounds on deserialize

I did this on a phone
2023-05-13 17:22:00 -05:00
Aaron Kimbrell
9d105a287d
fix: not everything attached to a path is a moving platform (#1090) 2023-05-13 13:47:28 -07:00
Aaron Kimbrell
739eae5244
feature: Implement FallSpeedBehavior (#1084)
* Hacky FallSpeedBehavior

* Fixup

* Make it more robust like speedboost
add check for default
Fix error in GetActiveSpeedboosts

* simplify and address feedback
2023-05-13 09:30:59 -05:00
Gie "Max" Vanommeslaeghe
07803a7ca2
Merge pull request #1085 from DarkflameUniverse/issue-436
fix: not exiting shooting gallery when clicking activity close button
2023-05-13 14:11:16 +02:00
Gie "Max" Vanommeslaeghe
61ae619886
Merge pull request #1032 from EmosewaMC/FixWingreaper
Fix Wingreaper birds not moving
2023-05-13 14:04:37 +02:00
David Markowitz
c5afd7d4a3 Fix deserialization errors for MovingPlatforms
- Fixes deserialization errors for MovingPlatforms that did not have an attached_path, but had a MovingPlatform component >= id 0.
2023-05-13 04:04:15 -07:00
Aaron Kimbre
a809f36548 Address feedback 2023-05-11 09:23:48 -05:00
Aaron Kimbrell
6e6a05fc1d
fix: prevent negative imagination (#1083)
* fix: prevent negative imagination
And fail switch if we don't have enough imagination

* Make better
2023-05-11 06:37:02 -05:00
Aaron Kimbre
5af5b0f1c1 fix: not exiting shooting gallery when clicking activity close button
Fixes #436
Fixes crash when replaying as well
2023-05-10 19:26:04 -05:00
Aaron Kimbrell
bf0ae6f181
fix: add check for arg nums on handlepushobject (#1081) 2023-05-10 07:44:21 -05:00
Aaron Kimbrell
b1cd2776fa
fix: make exiting the race work (#1082) 2023-05-10 04:05:56 -05:00
Aaron Kimbrell
4ff5afd9f7
Fix race exit dialogue always exiting (#1077)
Fixes #1048
Tested that closing the dialog via esc, the x in the top right, or the big red x doesn't exit the race
Tested that the green check button does exit the race
2023-05-09 00:40:00 -05:00
Gie "Max" Vanommeslaeghe
64a947e338
Merge pull request #1069 from EmosewaMC/NullChecks
Add more null checks and split out code
2023-05-08 12:10:58 +02:00
Aaron Kimbrell
8ceabadcde
Removed some hardcoded logic for racing (#1075)
Including return world and what activity ID to use for rewards
2023-05-08 04:38:08 -05:00
David Markowitz
cffb1449d8
Add better logs to saving (#1068)
* Fix overread in projectile behavior

* Fix stuns

* Correctly read in bitStream

* Fix projectile behavior

* Address movement type issues

* Update shutdown time to be accurate

* Fix small issues

* Fix missing template

* Add note for compile jobs

* Add bounds check for speed division

* Add better logs
2023-05-06 13:32:38 -05:00
David Markowitz
df3265c82e Add more null checks and split out code
Makes crash logs more apparent for what stage they crashed in for the engine updating.
2023-05-05 23:31:30 -07:00
Aaron Kimbrell
e297aacc68
Breakout message identifiers (#1065)
and make them scope enums
2023-05-03 16:38:32 -05:00
Aaron Kimbrell
c17b5fa586
prevent ressurecting with more than max stats (#1064)
for health and imagination
2023-05-03 01:31:50 -05:00
Aaron Kimbrell
6aa90ad5b2
Breakout rest of the enums from dCommonVars and clean it up (#1061)
* Breakout rest of the enums from dcommonvars
so we don't have to deal with merge conflicts
ePlayerFlags is not a scoped enum, yet, due to it's complexity

* address feedback

* make player flag types consistent

* fix typo
2023-05-02 17:39:21 -05:00
Aaron Kimbrell
4976701f37
breakout object bits into scoped enum (#997)
* breakout object bits into enum class
tested that things still work as expected
use the inplace set bits where appropiate

* add inline
2023-04-25 13:17:40 -05:00
Gie "Max" Vanommeslaeghe
de1ddd3125
Merge pull request #1019 from EmosewaMC/inventoryTypeCorrections
Correct incorrect inventory types
2023-04-23 12:49:43 +02:00
Aaron Kimbrell
2e284eb2ce
Implement Timer handlers in triggers and ontimerdone trigger event (#1031)
* Works, but AOE is broken

* Address Feedback

* fix typo
2023-04-18 12:48:03 -05:00
Aaron Kimbrell
f60ea40acc
Add random end of race behavior (#1056)
* randominze between 0 and 7 inclusive
for the different animation types

* Make the end behavior deterministic unpon loading
So that all players see the same animations for each other
2023-04-18 01:40:20 -05:00
David Markowitz
fbfa778d3d
Patch ghosting exclusions (#1059) 2023-04-17 14:19:26 -05:00
David Markowitz
4734996c7c
Resolve most compiler warnings (#1053) 2023-04-12 11:48:20 -05:00
Aaron Kimbrell
ce51438bc8
Implement some scripts for alpha FV (#1049)
* Implement maelstrom fog for alpha FV
add OnOffCollisionPhantom call to cppscripts
Add physics shape for gas blocking volume

* Add Ninja Sensie Script for alpha FV
and migration

* Fix private var casing

* And ninja wild scripts
they keep making me add more things

* address feedback

---------

Co-authored-by: Gie "Max" Vanommeslaeghe <gievanom@hotmail.com>
2023-04-12 11:46:31 -05:00
David Markowitz
308d56968a Use epsilon comparison 2023-04-11 22:25:02 -07:00
David Markowitz
268155fc98
Fix more invisible enemy issues (#1052) 2023-04-11 00:42:12 -07:00
David Markowitz
33f9e9c8cb
Allow case insensitive commands (#1047) 2023-04-08 15:45:45 -05:00
David Markowitz
541250176c
Resolve many issues with invisible enemies and End Behavior nodes not firing (#1044)
* Finall fix invisible enemies

* Add garbage collection

* Add comment

* Add constexpr for lagFrames
2023-04-05 08:57:47 -05:00
Gie "Max" Vanommeslaeghe
3202b5a36e
Merge pull request #1042 from EmosewaMC/FixSkills
Fix SwitchMultiple incorrect handling
2023-04-03 20:52:22 +02:00
Gie "Max" Vanommeslaeghe
d25b7729b6
Merge pull request #1043 from DarkflameUniverse/update-change-orientation-behavior
Fix and fully implement ChangeOrientation behavior
2023-04-03 20:51:39 +02:00
Aaron Kimbre
930735860b use z axis 2023-04-03 13:10:51 -05:00
David Markowitz
426a84daf9
Update InterruptBehavior.cpp 2023-04-03 09:37:29 -07:00
Aaron Kimbre
dffcbcd4d4 cleanup 2023-04-03 08:29:39 -05:00
Aaron Kimbre
a5ff93351d remove empty line
remove undeeded header
2023-04-03 08:25:47 -05:00
Aaron Kimbre
1fb086ccbd Fully implement Change orientation
fix bug where you would always look at self
added to_angle handline
2023-04-03 08:21:23 -05:00
David Markowitz
b8251c06b8 Fix incorrect SwitchMultiple handling 2023-04-03 04:11:02 -07:00
David Markowitz
a26f29baf6
Fix some models not disassembling into bricks (#1041) 2023-04-02 23:26:44 -07:00
Aaron Kimbre
595afe42e5 fix the lookat 2023-04-02 22:37:24 -05:00
David Markowitz
54d8c45b52 Don't interrupt players 2023-04-02 18:05:42 -07:00
David Markowitz
801ca69778
Fix nameplate command (#1040) 2023-04-01 18:30:08 -07:00