Commit graph

50 commits

Author SHA1 Message Date
MysterD
5f3895463f Prevent remote player damage from shaking local screen 2020-09-21 18:22:58 -07:00
MysterD
54cd42608d Allow players to enter the 70 star door early 2020-09-20 17:54:25 -07:00
MysterD
bbdc3180cd Made celebration star appear above correct player
Celebration sparkles appear around all players
2020-09-19 17:28:11 -07:00
MysterD
2c46eec6ba Prevented rare unlocking door crash 2020-09-19 16:19:47 -07:00
MysterD
6d438ba760 Fix first-person camera lock bug
Getting kicked in vanilla-cam's first person messed up the camera, this
fixes it.
Fixes #55
2020-09-11 22:32:32 -07:00
MysterD
718974c111 Fix PSS's secret star collection
Fixes #56
2020-09-11 22:25:49 -07:00
MysterD
cf732c7beb Eject a player if more than one is in the cannon
Two players in the same cannon was causing softlocks and general
insanity. Now this should be fixed. Also prevented players from being
able to push or attack a player inside of a cannon.
2020-09-08 16:12:11 -07:00
MysterD
ef6ec31075 Prevent ground pound from attacking until they're moving downward 2020-09-08 15:01:31 -07:00
MysterD
a2fe4f80a7 Lower knockback for anything stronger than a kick 2020-09-08 14:57:50 -07:00
MysterD
26726121a5 Players sliding in the same direction will no longer attack each other
We check to see what the difference in velocities is, if it's small then
no attack is made. Otherwise, only the player going faster will attack.
2020-09-08 14:43:07 -07:00
MysterD
3b946eb5e1 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
88b935e9dd 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
ef48ec249a 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
bc2480da87 Added aggressive null checking to various types of objects 2020-09-07 00:29:18 -07:00
MysterD
e0903003f4 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
7dafd081e1 Made player attack knockback configurable 2020-09-06 12:18:33 -07:00
MysterD
bed036bcfb 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
51940d6a82 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
906ea3345e 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
d5005c9f37 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
ab9e7c7bca Added player-to-player interactions
Players are now solid to each other and can push each other
Players can now attack each other (but they do not deal damage)
Players can bounce on top of each other, and they get squished
temporarily
Players are given slightly offset positions when they transition between
areas and levels, so they're no longer on top of one another.
2020-09-02 23:50:27 -07:00
MysterD
b9e84ad3b9 Shell music only starts and stops for local player 2020-09-01 23:41:56 -07:00
MysterD
13d4a0bfe8 Fixed stomache slide hang, made grabs only happen on local 2020-08-29 12:57:20 -07:00
MysterD
d2a2a80d56 Synchronized Big Boo's Haunt + major changes
Synchronized currentRoom per-player
Synchronized haunted bookshelf, and the bookshelf manager
Synchronized haunted chairs
Synchronized mad piano
Synchronized BBH's tilting trap, and made the physics multiple-player-aware
Synchronized scuttlebugs
Synchronized every variety of Boo
Synchronized elevators
Synchronized flamethrowers
Synchronized the various types of enemy books
Synchronized the book switches
Synchronized jumping box
Made coffins multiple-player-aware

Fixed everything that used gMarioState as an array instead of gMarioStates
Prevented some NPC-dialog softlocks
Prevented the remote player from messing up the local's camera settings
Possibly fixed the relatively rare chain chomp softlock
Possibly fixed the relatively rare chain hoot softlock
Fixed the first-person-camera softlock
Forced camera code to use the correct mario struct
2020-08-26 23:29:40 -07:00
MysterD
92398f3ca1 Made rumble only happen for local events 2020-08-13 18:49:24 -07:00
MysterD
48f42d1873 Fixed visual bug when both players are sliding 2020-08-12 19:14:35 -07:00
MysterD
d5b087acd8 Synchronized hoot 2020-08-11 23:01:13 -07:00
MysterD
2177094730 Synchronized wing cap and hidden trigger pickups 2020-08-10 23:38:58 -07:00
MysterD
41647d95c4 Synchronize Bobomb buddies and cannons 2020-08-09 07:42:44 -07:00
MysterD
eeec6aae49 L is real 2020
Added Luigi model.
Renamed all previous references to 'Luigi' to 'Mario2' since player 1
isn't always mario, and player 2 isn't always luigi.
Now server is always mario and client is always Luigi.

Luigi model credits:
Original model by Cjes, converted by AloXado320, textures added/fixed by
SunlitSpace542.
2020-08-08 21:36:49 -07:00
MysterD
b07aa565d4 Synchronized 3 types of star spawning, adjusted star interactions 2020-08-08 18:57:04 -07:00
MysterD
8b24d364bb Synchronized purple switch
Started working toward synchronizing star spawning, not quite there yet
2020-08-07 19:37:19 -07:00
MysterD
444c1fdd3b Synchronized coin collection
Reimplemented how randomness is synchronized
2020-08-07 18:01:58 -07:00
MysterD
5ec9ab9ec0 Synchronized seesaw, started moving toward a MAX_PLAYERS define 2020-08-06 22:52:32 -07:00
MysterD
e0b86b7d59 Synchronized teleports (e.g. flowerbed) and star collection
Fixed infinite packet_level_warp sending
2020-08-06 20:28:21 -07:00
MysterD
6d0d7ffbaa Dialog to toad/signs/doors no longer soft-locks or stops time 2020-08-03 23:23:09 -07:00
MysterD
01e02affad Saved player index in held objects 2020-08-01 19:03:26 -07:00
MysterD
fa2470327f Prevent situation where both players hold same object 2020-08-01 18:56:42 -07:00
MysterD
4351a6345a Made Goomba Luigi-aware, fixed Mario's hurtboxes 2020-07-31 22:13:05 -07:00
n64
4a448cf10d merge refresh 10 2020-06-20 02:49:59 +03:00
Zerocker
ce864043c1 Enabled rumble for all versions. 2020-05-24 23:52:03 +09:00
n64
c45aa301bb Refresh 8 2020-04-03 14:57:26 -04:00
n64
06ec56df7f Refresh 7 2020-03-01 22:42:52 -05:00
n64
9a801cb96d refresh 6 2020-02-03 00:51:26 -05:00
n64
9273f38df1 refresh 5 2020-01-03 10:38:57 -05:00
n64
04732af90b refresh 4 2019-12-01 21:52:53 -05:00
n64
a7c423cb43 Refresh 3 2019-11-03 14:36:27 -05:00
n64
52e605f075 Refresh 2 2019-10-05 15:08:05 -04:00
n64
1ef98ec785 Refresh 1 2019-09-01 15:50:50 -04:00
n64
89e8690857 init2 2019-08-25 00:46:40 -04:00