Commit graph

61 commits

Author SHA1 Message Date
Cooliokid956
283cf4f1f8 Catch source code colors 2026-06-23 21:59:33 -05:00
Isaac0-dev
3e39f5651a add some bounds checks 2024-11-13 13:29:50 +10:00
PeachyPeach
14cbb673fc
Proper custom object fields (#39) 2024-05-14 08:52:56 +10:00
Isaac0-dev
8845b3ef0c
fixed a bug where sync objects could be duplicated (#35)
this would happen if the sync object was spawned before the other players in the level's area sync was valid
2024-05-10 19:32:50 +10:00
Agent X
a6b938df75 Shorten include paths by removing unnecessary "src/" 2024-04-17 17:28:38 -04:00
Agent X
6e14336bf1 Fix console color code bleeding 2023-12-06 18:57:58 -05:00
David Joslin
d824e77cf5 Fixed crash in generate_parent_id() 2023-11-08 19:58:32 -05:00
MysterD
be19fbaf15 Show who spawns what in in-game console 2023-06-23 13:08:19 -07:00
MysterD
7ff1622745 Added last remote object information to crash screen 2023-05-22 23:00:11 -07:00
MysterD
688cd3b399 Rewrite how models are loaded and retrieved... yet again 2023-05-16 00:01:10 -07:00
MysterD
ca57853d18 Improve logging 2023-04-30 23:33:48 -07:00
MysterD
01d91ff07d Added profiling to more places to make lag easier to track down 2023-04-30 17:39:45 -07:00
MysterD
c1e33f5e70 Doubled extended model id size, avoided using vanilla object slots 2023-04-24 01:01:50 -07:00
MysterD
01c379d50d Fixed crash in network_send_spawn_objects_to() 2023-04-13 22:36:47 -07:00
MysterD
de6e783c20 Fix some sync ID bugs 2023-03-27 12:29:20 -07:00
MysterD
d12fc6c37a Remove old sync id reservation system 2023-03-26 19:06:18 -07:00
MysterD
42544557c4 More sync id cleanup 2022-06-06 20:39:18 -07:00
MysterD
3b626845e1 Refactor sync objects, move syncIds to u32 2022-06-06 19:13:04 -07:00
MysterD
c0cfc89236 Sync setHome value in spawn object 2022-06-02 21:02:43 -07:00
MysterD
8f50ee17c9 Fixed critical flaw with txEventId/rxEventId, fixed up controllable platform 2022-03-29 20:57:47 -07:00
MysterD
ed53a5422c Desynchronize bouncing fireball spawner - just too noisy 2022-03-29 19:04:50 -07:00
MysterD
47d2fe30a7 Made Lua object custom fields allocate deterministically 2022-03-26 23:58:04 -07:00
MysterD
8bc0abb6a2 Remove spawn object field remembering system. Broken and unnecessary 2022-03-24 18:08:05 -07:00
MysterD
41275835e7 Lua : remember up to 16 extra fields to send on spawn lua object 2022-03-21 11:45:19 -07:00
MysterD
41eef5fd2c Hook DynOS into mods when they're activated (custom models) 2022-03-16 01:11:48 -07:00
MysterD
89d44f6501 Moved smlua_XXX_utils.[ch] to src/pc/lua/utils/ 2022-03-09 23:09:33 -08:00
MysterD
d03aacc144 Added ability for Lua to spawn non-synchronized objects 2022-03-09 21:25:34 -08:00
MysterD
a1dbd4b268 Switch behavior ID length from 16bit to 32bit 2022-03-01 22:55:40 -08:00
MysterD
1131fb02db Prevented SM64 hang on object count overflow 2022-02-22 01:10:17 -08:00
MysterD
94bc7940cc Initial Lua support for spawning objects 2022-02-21 22:46:39 -08:00
MysterD
988c75d621 Fixed crash in save set flag packet 2022-02-13 16:31:22 -08:00
MysterD
2b9c5b5a90 Fixed crash in spawn object packet 2022-02-13 16:17:58 -08:00
MysterD
5ca457d4cd Fixed pragma-packing 2022-02-05 12:22:41 -08:00
MysterD
cdbf9eaabf Networking improvements
Reliable packets now save the actual remote address
Clients now only accepts server packets from the desired server
2022-01-23 01:55:43 -08:00
MysterD
b2849405b3 Changed all asserts in packet files to soft asserts 2021-08-23 18:58:30 -07:00
MysterD
ee53beb10b Coin/star collection packet fixes
Added flag to send packet to everyone in the level regardless of area.
Coin collection packets now send to everyone in the level which keeps
coin counts consistent among players.
Star collection packets will no longer collect the wrong star if in a
different area than the originating player.
2021-08-14 17:53:08 -07:00
MysterD
58914e993f Prevent sending object-related packets until the area is synchronized 2021-08-10 18:46:33 -07:00
MysterD
710a7e4749 Color detached caps according to player palette 2021-08-06 01:02:07 -07:00
MysterD
cbb7eb419c Prevent level/area/object sync during credits sequence 2021-08-05 00:22:03 -07:00
MysterD
59d08a90b9 Fixed how "levelAreaMustMatch" packets are sent/processed
Instead of the server dropping them immediately, the server only drops the processing. This allows it to broadcast/send the packet to the correct client without the server processing it.

Fixed how "static" level objects were detected. The old way was error prone and would consider spawned objects to be static anyway.

Made ERROR_LOGs always show up, "disabling" logging only turns off INFO_LOGs now.
2021-06-13 17:47:58 -07:00
MysterD
7ae26b3ea0 Complete rewrite of entity ID reservation system
Now "syncId"s can only be reserved at ID 127+. This ensures that static level
objects and spawned reserved objects never clash. The server keeps track of
every player's list of reserved IDs, as well as when an ID is used, or when
an entity using that ID is destroyed. This is much more complicated than it
used to be, but this complication is required due to players being allowed to
be in different areas of the game.
2021-06-13 16:04:28 -07:00
MysterD
33fbed94e4 Synchronized respawners and entities created after level load 2021-06-08 21:21:52 -07:00
MysterD
bbdc942501 Ripped out level synchronization/warp code
Began writing new system that synchronizes course/act/level/area per
player and 'ownership' of that location.
2021-06-07 12:19:59 -07:00
MysterD
9f158de95d Remove two-player hack for controlled warp 2020-10-15 18:04:53 -07:00
MysterD
85c05e7d56 Removed two-player hacks for packet_spawn_objects 2020-10-14 00:15:56 -07:00
MysterD
28ad7f91ed Smooth over transition from sending raw enums 2020-10-13 23:04:08 -07:00
MysterD
c8a45235ca Removed two-player hacks from cannon and object packets
Increased error checking of get_behavior_from_id
Made failure logging for packet_object a lot better
Changed debug logging to show global index instead of "Server/Client"
Changed debug keyboard binds to support more keyboard types
Made SyncObject's rxEventId de-duplication per-player instead of one-player
Removed sizeof(enum) from packet_read/packet_write
2020-10-13 21:44:27 -07:00
MysterD
5d9d5ed9d7 Added ability for client to send a packet to server, and for the server to broadcast to all clients 2020-10-12 18:23:48 -07:00
MysterD
168a41f0f6 Drop various types of packets if level/area doesn't match 2020-09-26 15:52:00 -07:00
MysterD
e1cc0aa065 Synchronized bouncing fireball spawners 2020-09-22 21:37:26 -07:00