Commit graph

42 commits

Author SHA1 Message Date
MysterD
71589938df Fix King Bobomb dialog softlock
Fixes #45
2020-09-10 21:26:17 -07:00
MysterD
1e6c734ced Completely rewrote level transition synchronization code
Should be snappier and less prone to crashes. I tested as many scenarios
as I could think of and it has been rock solid. But time will tell.

Also created a new debug log system, just so I could understand what the
hell was going on with this code.
2020-09-10 00:17:30 -07:00
MysterD
1e46ed136a Prevent extra death for bubbled player on area change 2020-09-08 13:53:46 -07:00
MysterD
bc2480da87 Added aggressive null checking to various types of objects 2020-09-07 00:29:18 -07:00
MysterD
36e035984f Pausing the game no longer pauses, just brings up the menu
Fixes #19
2020-09-06 22:27:09 -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
b9750057d5 General network code clean up
Marked globals, rearranged functions, added comments
2020-09-06 11:02:41 -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
670a554b37 Remove any lingering dialog boxes on level transition
Fixes #22
2020-09-04 21:27:06 -07:00
MysterD
5d7499bd2a Fixed crash when changing areas within a level
Bug reported by somario360:
After I (Luigi) exited the slide in CCM, an error message appeared and ignoring would make it pop up again.

This was due to the sync ID reservation system not being flushed and
reset on area change.
2020-08-30 23:13:05 -07:00
MysterD
13b216ea5d Synchronized Boo 2020-08-24 21:38:49 -07:00
MysterD
8c650a5b7d Created system to reserve sections of SyncIDs per client
This allows clients to spawn a new sync object after the level loads and synchronize it.
Changed how un-initialized sync objects are detected
Koopa shells are the first thing to use this new system

Removed network_object_settings() command, instead explicitly setting the sync object parameters
2020-08-24 18:33:53 -07:00
MysterD
aaf521659e Disabled many timestops 2020-08-10 18:10:04 -07:00
MysterD
1bef126df8 Synchronize area changes 2020-08-10 12:08:40 -07:00
MysterD
6701b6096d Rewrote level synchronization
Synchronized exit course from pause menu
2020-08-10 09:33:40 -07:00
MysterD
2e768869e3 Misc fixing to entering paintings 2020-08-09 18:58:58 -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
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
4452b38848 Synchronized inside-painting state 2020-08-04 20:49:53 -07:00
MysterD
ec2199892f Force synchronizing of level changes 2020-08-02 23:02:29 -07:00
MysterD
6b3ab5f115 Started adding player 2 / Luigi 2020-07-29 21:08:38 -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
fgsfds
ece7649b4b use a wrapper for exiting instead of just calling exit()
this might also fix the webgl build issue
2020-05-17 19:56:56 +03:00
IvanDSM
2b098781b8 skip_intro now skips Lakitu and Bowser intros 2020-05-15 17:09:02 -03:00
IvanDSM
e96bbef650 Fix configfile skip_intro option 2020-05-15 16:47:04 -03:00
Vinícius R. Miguel
4a13fd3380 Add in-game control binding menu
Originally on the testing branch
2020-05-15 15:38:35 -03:00
IvanDSM
86a3f84010
Merge branch 'master' into skipintro 2020-05-14 23:05:21 -03:00
Hyenadae
691d6f382b WIP In-Game Exit via pause+save menus w/ Localizations 2020-05-11 06:58:33 -04:00
IvanDSM
bd93878c56 Add option in the configfile for skipping the intro
Now it's possible to either provide the --skip-intro command line argument or have skip_intro set to 1 on the config file.
2020-05-11 05:13:51 -03:00
IvanDSM
4cbe3af070 Added CLI functionality with --skip-intro option. 2020-05-11 02:42:22 -03:00
Jan200101
e87c070517
merge PC port onto the decompile 2020-05-07 20:21:22 +02: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
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