Commit Graph

771 Commits (9bbacb90f7c2906bf24ed1e6375890e433157288)

Author SHA1 Message Date
MysterD 9bbacb90f7 Prevent extra death for bubbled player on area change 2020-09-08 13:53:46 -07:00
MysterD c9db255ac6 Completely disable text saves until they're synchronized 2020-09-08 13:34:35 -07:00
MysterD 4b03c93e65 Added custom luigi head sprite by air 2020-09-08 12:17:24 -07:00
MysterD 2771c1be7c Allow exiting from course at any time 2020-09-08 09:52:48 -07:00
MysterD c619d61193 Make inside-and-outside painting transition quicker over network 2020-09-08 09:50:34 -07:00
MysterD c8a8a3fd53 Fixed glitchy animations on remote when in dialog 2020-09-08 09:33:55 -07:00
MysterD bd63cf07f5 Unagi: prevent sending a pointer, hopefully doesn't cause desync 2020-09-08 09:16:44 -07:00
MysterD f78581c449 Racing Penguin: remove airborn check, fix end of race desync 2020-09-08 09:15:43 -07:00
MysterD 14a2e95c09 Fix koopa the quick sound spam and cheat detection 2020-09-08 09:06:25 -07:00
MysterD bd3aeb3d7b Synchronized star entity interaction
Fixed error in packet_collect_star which would prevent the star from
disappearing when it should on remote.
2020-09-08 09:01:35 -07:00
MysterD 821c1ccb18 Added stay-in-level-after-star server-side setting.
Configurable in the server's config file under:
coop_stay_in_level_after_star

Defaults to off

Based on GateGuy's patch
2020-09-08 00:04:06 -07:00
MysterD 8b23a8e0e2 Prevent exclamation box from spawning the wrong star on remote 2020-09-07 23:56:29 -07:00
MysterD 197d9c93ff Prevent exclamation box from double spawning stars 2020-09-07 23:10:28 -07:00
MysterD 3387347d65 Make send_spawn_objects more reliable
As noticed by anuserlol, stars would sometimes not spawn from breakable
boxes on the remote. This was due to the box being destroyed before the
star spawned, when the star tried to spawn it couldn't find the parent
and gave up. Now if no parent is found the spawned object will be its
own parent. This should make all spawned objects more reliable, but may
cause weirdness somewhere.

Fixes #34
2020-09-07 20:54:15 -07:00
MysterD 85ba18daef Force marioObj player indices to be well behaved
Fixes a crash when spawning the secret star in The Princess's Secret
Slide.

Fixes #32
2020-09-07 20:30:20 -07:00
MysterD 65888cc035 Synchronized room checking better + fixed bookswitches
Determining if the player is in the room was bugged, and bookswitches
caused Luigi to crash. Now things should be a bit more stable in BBH.
Fixes #30
2020-09-07 19:51:39 -07:00
MysterD d00945ec81 Allow other player to pass through door when it's being opened
Also disable the 'walking through door' cutscene when newcam is on
2020-09-07 16:35:42 -07:00
MysterD ddb5f1782f Make 60 fps patch apply in case people don't realize it is already merged 2020-09-07 11:07:28 -07:00
MysterD 5cc7b03c78 Fixed infinite loop with King Bobomb 2020-09-07 10:50:32 -07:00
MysterD 893454d0e3 Misc camera fixes
Made analog camera stop rotating or triggering TOTWC when paused
Fix broken vanilla camera on TOWTC w/BETTERCAMERA enabled
Fixes #15
2020-09-07 10:48:54 -07:00
MysterD 088050e4ce Added aggressive null checking to various types of objects 2020-09-07 00:29:18 -07:00
MysterD 21759a2a34 Pausing the game no longer pauses, just brings up the menu
Fixes #19
2020-09-06 22:27:09 -07:00
MysterD 416f4a1398 Rewrote how players are initialized, stored, and displayed
Since the second-player code was the first code I wrote, it was implemented
poorly. At that point, I didn't know the code base at all and the way it was
written would prevent anyone from ever adding to those parts.

The rewrite allows me to use the default geo.inc.c file for Mario, and removes
all of the geo2.inc.c files. I no longer do a bunch of bit shifting to figure
out which player is being drawn in the rendering code.

I'm also now able to remove tons of duplicate code that exists just for the
remote player. The main player code is generic enough to support both indices.
A side-effect of the rewrite is I was able to remove many assumptions in the
code where two-players is assumed, but many other parts of the code still
assume two players.

This is a fairly major change that, if all goes well, will be completely
unnoticed by the player. However, I do expect new bugs to pop up in strange
places. Time will tell.
2020-09-06 18:52:52 -07:00
MysterD 62ecf2c58a Geo2 removal wip 2020-09-06 13:54:01 -07:00
MysterD 480fd8587a Fix join issue when compiling without DEBUG 2020-09-06 12:46:02 -07:00
MysterD 00daf97c40 Made player attack knockback configurable 2020-09-06 12:18:33 -07:00
MysterD 20a317afdb General network code clean up
Marked globals, rearranged functions, added comments
2020-09-06 11:02:41 -07:00
MysterD 09711dbd37 Added coop settings to saved config file
Saves and loads last join IP/port attempt
Made host's port configurable in config file
Made host's save slot configurable in config file
Made host's player interaction setting configurable in config file

Indicated when the client was trying to connect on the join menu.
Fixed join menu display error where the port would disappear
2020-09-06 03:32:34 -07:00
MysterD b549f165ab Player interaction enhancements
Made water punch do an attack
Increased knockback significantly
Different types of attacks will have different knockback severity and damage (Stomp > kick > the rest)
Fixed rapid attack spam
Adjust radius for bouncing on players and popping bubbles

Made player interactions a synchronized server flag:
  None - Players are not solid
  Solid (Default) - Player can run into each other and stun each other
  PVP - Same as solid except friendly fire is on
Note: Not currently configurable due to a lack of a UI.
2020-09-06 10:05:58 -07:00
MysterD 925a0b276f Hide life counter when lives is -1 2020-09-05 21:17:33 -07:00
MysterD daa825b532 Add disclaimers to main menu 2020-09-05 21:12:49 -07:00
MysterD 9ca4362388 Synchronized 1-up collection
Collecting a 1-up gives a life to both. This can bring back a bubbled
player who had no lives remaining.
2020-09-05 19:55:38 -07:00
MysterD c232cf01fd Created Luigi's life icon 2020-09-05 19:44:58 -07:00
MysterD 5857b71209 Players turn into bubbles when they die
Player life counters are separate.
When one player dies they lose a life and are turned into a bubble.
If the other player pops it, they are alive again.
If all players are bubbled, they get kicked out of the level.
If the bubbled player ran out of lives, they can not come back to life
until the level is over.
Whenever a level change happens, everyone's life count is set to a
minimum of two.
No game overs.

Took heavy inspiration from Kaze Emanuar
2020-09-05 18:10:55 -07:00
MysterD 25c4267ae5 Allow vanish cap to pass through walls
fixes #16
2020-09-05 13:31:36 -07:00
MysterD 40590bdcbb Fixed Luigi sideburns, renamed Luigi textures 2020-09-05 10:02:11 -07:00
MysterD e2aa45129e Fix EXTERNAL_DATA for Luigi
Fixes #25
2020-09-05 00:11:15 -07:00
MysterD 9f9d9045ac Change default save directory to sm64ex-coop 2020-09-04 22:17:15 -07:00
MysterD ff45ad5f45 Remove any lingering dialog boxes on level transition
Fixes #22
2020-09-04 21:27:06 -07:00
MysterD 33c79c40a0 Remote reading sign no longer causes sound spam
fixes #20
2020-09-04 21:14:14 -07:00
MysterD cc920c9fdf Fix animation desync when pressing Z+B
Fixes #18
Found by el pinguino max
2020-09-04 21:08:04 -07:00
MysterD c93096c2a6 Force no draw distance on and text saves off 2020-09-04 17:52:48 -07:00
MysterD 3d51e21be9 Add docker-build workarounds and container script 2020-09-04 17:03:35 -07:00
MysterD 96c19d3c4c Synchronized save files
Now when a client joins, it will request the entire 512 byte EEPROM from
the server and refuse to continue until the server replies with the
contents. Then the client will override all reads and writes to the
EEPROM/save file. Thus, a client will never overwrite their local save.

Fixes #21
2020-09-04 15:07:32 -07:00
MysterD 9e7d7b03ea Removed 'int' from most of networking code
moved -Werror over to 'STRICT'
2020-09-04 11:43:12 -07:00
MysterD fc4d4d3d99 Added custom packets for mods-of-this-mod
Now a patch can choose to register callbacks for sending and receiving
packets. It's a bit tricky to use but at least it won't collide with
normal packets or other mod packets.
2020-09-04 02:04:37 -07:00
MysterD 7c6298acbc Served time for crimes against C
Due to my compile & launch scripts, I was silently ignoring warnings
this whole time. I've fixed my process, and gone back to fixed all of
the warnings I could (even outside of my code).
2020-09-04 01:58:54 -07:00
MysterD e949767243 Add coop-specific define
Added -DCOOP to identify that this is a coop build so that one patch can
be applied to EX and/or COOP. They can choose to ifdef entity synchronization
out.
2020-09-03 21:49:58 -07:00
MysterD c56060ebd5 Prevent infinite loop for remote sliding players 2020-09-03 18:32:07 -07:00
MysterD 0a463ae362 Added host/join in-game GUI
Now people aren't forced to launch with command-line parameters,
instead they can host or join a server by selecting buttons in
the main menu.
2020-09-03 18:30:15 -07:00