Commit graph

2530 commits

Author SHA1 Message Date
HunterHeard
ad5e7402fc
Co-op ripples (#118)
* First attempt

First attempt at having other Mario objects create ripples.

Works very inconsistently, the position of players not currently interacting with the painting seems to influence whether the ripples will work or not

* Moved nearest mario code from geo_painting_update

Instead of using the nearest mario object for geo_painting_update, I use it in painting.c functions that called for gPaintingMarioXYZPos, substituting the nearest Mario object's position instead, as well as using it for the last floor mario was over.

This method still isn't quite perfect and there's a few more things I'd like to fix/change.
1. If a Mario is closer to the painting (perhaps right against the middle) other Mario's can't trigger ripplings at all unless they get closer than the closest Mario
2. I would like for all Entry and Exit ripples to interrupt each other, meaning if multiple Marios jump in, each one triggers a ripple one after the other
3. I want to hear the other player's exit sounds

* Add currPositionValid

Sets currPositionValid to false for NetworkPlayers who are connected, who changed levels to a level different from the local player, and who are not the local player when the local player changes levels.

* Set currPositionValid

Sets currPositionValid to false for update packets that don't match local area.
Sets it to true for update packets that do match local area.

* Send change area/level immediately

Adds a function network_on_loaded_area2() which only sends a change level or area event and doesn't clear the sync ids.
Calls this function almost immediately as opposed to waiting for LOADING_LEVEL_THRESHOLD frames

* Add currPositionValid to NetworkPlayer

currPositionValid (which is used by painting.c to determine if a player should be considered for the closest player to the painting) is a variable that tells you if a network player's marioObj has a position which can be relied upon as a valid position for that player.

network_player_update_course_level sets it to false for a network player if the new location does not match the local player's location.
network_receive_player sets it to false if a network player's update is from a different location than the local player, but sets it to TRUE if the update is from the same location.
update_course does NOT set it to true, because the location is not sure to be valid until we've received a location from the player with the right location attached to it.

* Use currValidPosition correctly

Uses currValidPosition correctly, also add debug text for seeing closest player to painting.

* fix merge

* Fix merge

* Verboser logging and invpos on enter

* Multi collision arrays

* Removed nearest code, added comments

* Added simultaneous ripples on one painting

* Added commented Gamepad from Background line

* Removed debug logging

* renamed secondary network_on_loaded function

* Added early multiple paintings rippling at once

* Added multiple paintings rippling simultaneously

Co-authored-by: djoslin0 <djoslin0@users.noreply.github.com>
2022-08-07 01:08:00 -07:00
Isaac0-dev
f1c2715fe7
Lives/Game over fix, exposed initiate_warp() and improved enemy lakitu (#143) 2022-08-05 23:09:13 -07:00
Emerald Lockdown
1dab06f476
Added Dynos Pack and Player to pause menu (#136)
* Added Dynos Pack and Player to pause menu

* Fixed bodyHeight
2022-08-05 22:23:38 -07:00
Prince Frizzy
913f41f6ae
Add some more functions for use in LUA, And expose others. (#129)
* Add some functions, and restore one.
2022-08-05 22:17:05 -07:00
MysterD
68634493de Fix up camera overrides in sm74 2022-08-05 21:18:37 -07:00
MysterD
9871ab71d5 Fix camera overrides in Star Road - by Isaac 2022-08-05 21:17:13 -07:00
MysterD
50d2946bcc Added star road 2022-08-05 21:13:47 -07:00
MysterD
165a7dd68a Fix up includes for clang 2022-08-05 20:55:31 -07:00
MysterD
0fba458465 Enforce type lengths for bin compression 2022-08-05 19:12:57 -07:00
MysterD
4794c2e130 added more info to uncompress error 2022-08-05 18:43:45 -07:00
MysterD
5d1aa7ea6d Display uncompress error 2022-08-05 18:04:33 -07:00
MysterD
9fab95a6e5 Prevent double free in DynOS compression code 2022-08-05 15:10:00 -07:00
MysterD
618f468e06 Add HOOK_USE_ACT_SELECT ; increase MAX_AUDIO_OVERRIDE to 128 2022-08-04 01:12:16 -07:00
MysterD
8057c9e501 Prevent crash in mod cache 2022-08-04 01:11:51 -07:00
MysterD
c214acb33f Change fixCollisionBugs from server setting to mod setting 2022-06-25 01:26:53 -07:00
Isaac0-dev
a344a23bb9
Fix collision bug in dark world and edit readme.md (#134) 2022-06-25 00:59:48 -07:00
Agent X
a9bbbacd71
Custom camera cleanup (#133) 2022-06-25 00:54:58 -07:00
Isaac0-dev
92cb5aadb7
Fix headless server compile (4) (#132) 2022-06-25 00:54:39 -07:00
PeachyPeach
f0c6668423
DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
MysterD
4da9812d9b More packet bytesize cleanup 2022-06-06 20:50:00 -07:00
MysterD
4dde3d4cfe Whoops 2022-06-06 20:41:46 -07:00
MysterD
42544557c4 More sync id cleanup 2022-06-06 20:39:18 -07:00
MysterD
29f3e8f1bf Fix mod cache issue where server wouldn't update the hash when it should 2022-06-06 19:34:44 -07:00
MysterD
3b626845e1 Refactor sync objects, move syncIds to u32 2022-06-06 19:13:04 -07:00
MysterD
ae7c1427b9 Only use defined signals 2022-06-05 22:57:17 -07:00
MysterD
946f16329c Added ability to have completely custom levels that don't override anything 2022-06-05 21:55:31 -07:00
Isaac0-dev
a40c3cf121
Raspberry Pi Support (#117) 2022-06-05 19:40:21 -07:00
MysterD
8928f7d207 Cleanup 2022-06-05 19:22:11 -07:00
HunterHeard
de60a0ae44
Add gamepad number, background options (#122)
Added two options, one which lets user choose which gamepad to use, and one
which allows game to be played with gamepad while in the background.

These two features together allow for "splitscreen" (sort of) multiplayer by
starting up instances and joining them together and selecting different
gamepads for each one.

Gamepad choices are 0-7. If a number is chosen that does not correspond to a
gamepad, the previous gamepad (last number you were on this session that had
a working gamepad) is used.
2022-06-05 19:16:24 -07:00
Isaac0-dev
e0e1d2e1a8
Fix compiling on Docker (#125) 2022-06-05 19:12:23 -07:00
EmeraldLoc
a63259cecf
Add .app support and fixed warning (#126) 2022-06-05 19:11:58 -07:00
Isaac0-dev
db7b82fc01
Detect termination signals (#127) 2022-06-05 19:11:15 -07:00
EmeraldLoc
fe4aab50b1
Remove act num if set to 0 (#128) 2022-06-05 19:10:34 -07:00
MysterD
2b4a4a6cd8 Fix behavior check in packet_object 2022-06-05 00:24:48 -07:00
MysterD
7a7a3c4223 Fix interpolated shadow corruption 2022-06-04 23:36:41 -07:00
MysterD
ecc72d0974 Prevent crashing on level change 2022-06-04 18:46:44 -07:00
MysterD
5424b1bb69 Close modfile at the correct time when downloading 2022-06-04 17:58:36 -07:00
MysterD
26a465fd80 Close file pointers immediately after reading/writing 2022-06-04 17:33:45 -07:00
MysterD
2e1818394e Show errno when fail to open file pointer 2022-06-04 17:20:41 -07:00
MysterD
91ad974684 Whoops2 2022-06-04 00:54:04 -07:00
MysterD
8b9e348537 Whoops 2022-06-04 00:53:27 -07:00
MysterD
a487978e3d Prevent client from sending sync valid packets improperly 2022-06-04 00:52:38 -07:00
MysterD
6008761818 Changed tree leaf particle check from hardcoded levels, to gEnvFxMode 2022-06-04 00:43:04 -07:00
MysterD
c95de7fe87 Allowed LEVEL_ENDING to be overridden by DynOS 2022-06-02 22:06:33 -07:00
MysterD
a8c11109ad Unhardcode castle cannon grate star requirement 2022-06-02 21:19:53 -07:00
MysterD
c0cfc89236 Sync setHome value in spawn object 2022-06-02 21:02:43 -07:00
MysterD
8c92885a7b Whoops, forgot to save 2022-06-02 19:50:41 -07:00
MysterD
3f9f877f5d Fixed up indentation 2022-06-02 19:46:51 -07:00
MysterD
e40fe57860 Unhardcoded more bowling ball values 2022-06-02 19:45:01 -07:00
MysterD
091437c430 More custom bhv cleanup 2022-06-02 19:33:28 -07:00