X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fserver%2Fmap_object_actions.c;h=978683292af5b76ab902e8cb5f3525b540bd9d1c;hb=6b1d36c9e673fd8f8595119080dca63a39ba483b;hp=17d74d5825feebad5555a81820ae4a1c7a02914e;hpb=c53b42dfc7e4de104f9189428dd5b9a0d431c00a;p=plomrogue diff --git a/src/server/map_object_actions.c b/src/server/map_object_actions.c index 17d74d5..9786832 100644 --- a/src/server/map_object_actions.c +++ b/src/server/map_object_actions.c @@ -139,14 +139,12 @@ static uint8_t match_dir(char d, char ** dsc_d, char match, char * dsc_match) static void playerbonus_move(char d, uint8_t passable) { - char * dsc_dir = "north"; - if ( match_dir(d, &dsc_dir, '6', "east") - || match_dir(d, &dsc_dir, '2', "south") - || match_dir(d, &dsc_dir, '4', "west") - || match_dir(d, &dsc_dir, '7', "north-west") - || match_dir(d, &dsc_dir, '9', "north-east") - || match_dir(d, &dsc_dir, '1', "south-west") - || match_dir(d, &dsc_dir, '3', "south-east")) + char * dsc_dir = "north-east"; + if ( match_dir(d, &dsc_dir, 'd', "east") + || match_dir(d, &dsc_dir, 'c', "south-east") + || match_dir(d, &dsc_dir, 'x', "south-west") + || match_dir(d, &dsc_dir, 's', "west") + || match_dir(d, &dsc_dir, 'w', "north-west")) { ; }