Skip to content

Commit

Permalink
Fix build fail due to REACH_ATTACK flag (cataclysmbnteam#3370)
Browse files Browse the repository at this point in the history
* Fix build fail due to REACH_ATTACK flag

Co-Authored-By: Vollch <[email protected]>

* Fix a lil oops

* style(autofix.ci): automated formatting

* Forgot that

How the fuck did it compile without what should be a vital include...

---------

Co-authored-by: Vollch <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 5, 2023
1 parent 30c5dcb commit 5f26a3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sdltiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "input.h"
#include "runtime_handlers.h"
#include "json.h"
#include "make_static.h"
#include "mapbuffer.h"
#include "mission.h"
#include "npc.h"
Expand Down Expand Up @@ -2765,7 +2766,8 @@ static void CheckMessages()
actions.insert( ACTION_CYCLE_MOVE );
}
// Only prioritize fire weapon options if we're wielding a ranged weapon.
if( g->u.primary_weapon().is_gun() || g->u.primary_weapon().has_flag( "REACH_ATTACK" ) ) {
if( g->u.primary_weapon().is_gun() ||
g->u.primary_weapon().has_flag( STATIC( flag_id( "REACH_ATTACK" ) ) ) ) {
actions.insert( ACTION_FIRE );
}
}
Expand Down

0 comments on commit 5f26a3c

Please sign in to comment.