ethanmoffat / etheos

[Eth]an's [E]ndless [O]nline [S]erver - fork of eoserv project
zlib License
13 stars 8 forks source link

Weddings #50

Closed Cirras closed 2 years ago

Cirras commented 2 years ago

This PR implements weddings, based on the implementation from mainclone-eoserv.

Some changes have been made for accuracy:

https://user-images.githubusercontent.com/22178573/189476563-176fe641-39c7-425d-9699-b1ac05e896db.mp4

Cirras commented 2 years ago

@ethanmoffat Made requested changes. If you're happy with them, I'll squash the commits into Implement weddings before merge.

ethanmoffat commented 2 years ago

This looks good, thanks for getting to those changes so quickly. I'd like to test this out since I haven't played around with weddings/law too much. I'll run through a few cases tonight and see if I can break it and approve here when I inevitably can't.

Don't worry about squashing commits, I prefer a richer commit history, makes it easier to figure out why something was done.

ethanmoffat commented 2 years ago

@Cirras A couple -Wreorder warnings on Linux:

[ 32%] Building CXX object CMakeFiles/eoserv_lib.dir/tu/game_1.cpp.o
In file included from /home/ethan/git/etheos/tu/../src/map.cpp:21:0,
                 from /home/ethan/git/etheos/tu/game_1.cpp:9:
/home/ethan/git/etheos/tu/../src/wedding.hpp: In constructor ‘Wedding::Wedding(Map*, unsigned char)’:
/home/ethan/git/etheos/tu/../src/wedding.hpp:32:14: warning: ‘Wedding::tick_timer’ will be initialized after [-Wreorder]   TimeEvent* tick_timer;
              ^~~~~~~~~~
/home/ethan/git/etheos/tu/../src/wedding.hpp:23:8: warning:   ‘Map* Wedding::map’ [-Wreorder]
   Map* map;
        ^~~
In file included from /home/ethan/git/etheos/tu/game_1.cpp:14:0:
/home/ethan/git/etheos/tu/../src/wedding.cpp:106:1: warning:   when initialized here [-Wreorder]
 Wedding::Wedding(Map *map, unsigned char priest_idx)
 ^~~~~~~
[ 35%] Building CXX object CMakeFiles/eoserv_lib.dir/tu/game_2.cpp.o
Cirras commented 2 years ago

@Cirras A couple -Wreorder warnings on Linux:

[ 32%] Building CXX object CMakeFiles/eoserv_lib.dir/tu/game_1.cpp.o
In file included from /home/ethan/git/etheos/tu/../src/map.cpp:21:0,
                 from /home/ethan/git/etheos/tu/game_1.cpp:9:
/home/ethan/git/etheos/tu/../src/wedding.hpp: In constructor ‘Wedding::Wedding(Map*, unsigned char)’:
/home/ethan/git/etheos/tu/../src/wedding.hpp:32:14: warning: ‘Wedding::tick_timer’ will be initialized after [-Wreorder]   TimeEvent* tick_timer;
              ^~~~~~~~~~
/home/ethan/git/etheos/tu/../src/wedding.hpp:23:8: warning:   ‘Map* Wedding::map’ [-Wreorder]
   Map* map;
        ^~~
In file included from /home/ethan/git/etheos/tu/game_1.cpp:14:0:
/home/ethan/git/etheos/tu/../src/wedding.cpp:106:1: warning:   when initialized here [-Wreorder]
 Wedding::Wedding(Map *map, unsigned char priest_idx)
 ^~~~~~~
[ 35%] Building CXX object CMakeFiles/eoserv_lib.dir/tu/game_2.cpp.o

Thanks, those warnings should be fixed now.

Cirras commented 2 years ago

After watching your recording of the weddings on GameServer.exe, I see a couple of minor opportunities for accuracy improvements:

Will look into doing these in the next day or two.

Cirras commented 2 years ago

A partner can leave the map or log out without erroring the wedding, but only after the rings have been given. If this happens, the wedding just skips to the end where the priest says "Congratulations to the couple!"

I'll tack in a commit to emulate this behavior as well.

Cirras commented 2 years ago

@ethanmoffat I think this is ready for another round of review.

ethanmoffat commented 2 years ago

This looks good. Going to do some quick testing and then merge it