Commit Graph

2330 Commits (029aca65481a9ab82d3944ad04f541c80362ce68)

Author SHA1 Message Date
HunterHeard 029aca6548 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 a30ac0d8ff Lives/Game over fix, exposed initiate_warp() and improved enemy lakitu (#143) 2022-08-05 23:09:13 -07:00
Emerald Lockdown ee810e893b 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 b87fb12f71 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 ab7eecc0bd Fix up camera overrides in sm74 2022-08-05 21:18:37 -07:00
MysterD ec04b8e9d7 Fix camera overrides in Star Road - by Isaac 2022-08-05 21:17:13 -07:00
MysterD 5f94ad7c0d Added star road 2022-08-05 21:13:47 -07:00
MysterD eb2ede88fa Fix up includes for clang 2022-08-05 20:55:31 -07:00
MysterD 74afddef7b Enforce type lengths for bin compression 2022-08-05 19:12:57 -07:00
MysterD df286fe9d3 added more info to uncompress error 2022-08-05 18:43:45 -07:00
MysterD 72a9a2f5af Display uncompress error 2022-08-05 18:04:33 -07:00
MysterD 66d38e8791 Prevent double free in DynOS compression code 2022-08-05 15:10:00 -07:00
MysterD d3ed4f3362 Add HOOK_USE_ACT_SELECT ; increase MAX_AUDIO_OVERRIDE to 128 2022-08-04 01:12:16 -07:00
MysterD 1e7814dc8e Prevent crash in mod cache 2022-08-04 01:11:51 -07:00
MysterD 8b3c3acd2c Change fixCollisionBugs from server setting to mod setting 2022-06-25 01:26:53 -07:00
Isaac0-dev 3743a924dc Fix collision bug in dark world and edit readme.md (#134) 2022-06-25 00:59:48 -07:00
Agent X 84b8574a08 Custom camera cleanup (#133) 2022-06-25 00:54:58 -07:00
Isaac0-dev 152e4f0450 Fix headless server compile (4) (#132) 2022-06-25 00:54:39 -07:00
PeachyPeach 92f4b22015 DynOS Bin Compression (#131) 2022-06-25 00:52:53 -07:00
MysterD a8244f367c More packet bytesize cleanup 2022-06-06 20:50:00 -07:00
MysterD d30526e999 Whoops 2022-06-06 20:41:46 -07:00
MysterD dc1774aa59 More sync id cleanup 2022-06-06 20:39:18 -07:00
MysterD 04958c072c Fix mod cache issue where server wouldn't update the hash when it should 2022-06-06 19:34:44 -07:00
MysterD fe6bc9405c Refactor sync objects, move syncIds to u32 2022-06-06 19:13:04 -07:00
MysterD fcc65317ca Only use defined signals 2022-06-05 22:57:17 -07:00
MysterD 1a1f593a38 Added ability to have completely custom levels that don't override anything 2022-06-05 21:55:31 -07:00
Isaac0-dev 40cdfc28f5 Raspberry Pi Support (#117) 2022-06-05 19:40:21 -07:00
MysterD e621b2f370 Cleanup 2022-06-05 19:22:11 -07:00
HunterHeard defb1d43d7 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 09f9f1561b Fix compiling on Docker (#125) 2022-06-05 19:12:23 -07:00
EmeraldLoc 1d89f4353e Add .app support and fixed warning (#126) 2022-06-05 19:11:58 -07:00
Isaac0-dev 074c915335 Detect termination signals (#127) 2022-06-05 19:11:15 -07:00
EmeraldLoc 658588b05e Remove act num if set to 0 (#128) 2022-06-05 19:10:34 -07:00
MysterD 349ae6a709 Fix behavior check in packet_object 2022-06-05 00:24:48 -07:00
MysterD 20c972c9fa Fix interpolated shadow corruption 2022-06-04 23:36:41 -07:00
MysterD 14a5a79eeb Prevent crashing on level change 2022-06-04 18:46:44 -07:00
MysterD 5532dea75f Close modfile at the correct time when downloading 2022-06-04 17:58:36 -07:00
MysterD 084ba327fd Close file pointers immediately after reading/writing 2022-06-04 17:33:45 -07:00
MysterD b84645b4d1 Show errno when fail to open file pointer 2022-06-04 17:20:41 -07:00
MysterD 96b536050f Whoops2 2022-06-04 00:54:04 -07:00
MysterD eb1a45346c Whoops 2022-06-04 00:53:27 -07:00
MysterD 5c5e8acd1c Prevent client from sending sync valid packets improperly 2022-06-04 00:52:38 -07:00
MysterD 6e087de181 Changed tree leaf particle check from hardcoded levels, to gEnvFxMode 2022-06-04 00:43:04 -07:00
MysterD 4a93e44779 Allowed LEVEL_ENDING to be overridden by DynOS 2022-06-02 22:06:33 -07:00
MysterD 1f0a55ada1 Unhardcode castle cannon grate star requirement 2022-06-02 21:19:53 -07:00
MysterD bf995d79c1 Sync setHome value in spawn object 2022-06-02 21:02:43 -07:00
MysterD b570091224 Whoops, forgot to save 2022-06-02 19:50:41 -07:00
MysterD bf5c9d7610 Fixed up indentation 2022-06-02 19:46:51 -07:00
MysterD 89a44c00b8 Unhardcoded more bowling ball values 2022-06-02 19:45:01 -07:00
MysterD 12af07a5e9 More custom bhv cleanup 2022-06-02 19:33:28 -07:00