Closed Cirras closed 2 years ago
@ethanmoffat
Made requested changes.
If you're happy with them, I'll squash the commits into Implement weddings
before merge.
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.
@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 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.
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.
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.
@ethanmoffat I think this is ready for another round of review.
This looks good. Going to do some quick testing and then merge it
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