Skip to content

Commit 43be870

Browse files
committed
string_view
1 parent 480b015 commit 43be870

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

game/world/objects/npc.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ void Npc::delOverlay(const Skeleton *sk) {
749749
}
750750

751751
bool Npc::toogleTorch() {
752-
const char* overlay = "HUMANS_TORCH.MDS";
752+
std::string_view overlay = "HUMANS_TORCH.MDS";
753753
if(isUsingTorch()) {
754754
visual.setTorch(false,owner);
755755
delOverlay(overlay);
@@ -761,7 +761,7 @@ bool Npc::toogleTorch() {
761761
}
762762

763763
bool Npc::isUsingTorch() const {
764-
const char* overlay = "HUMANS_TORCH.MDS";
764+
std::string_view overlay = "HUMANS_TORCH.MDS";
765765
return hasOverlay(overlay);
766766
}
767767

@@ -770,7 +770,7 @@ void Npc::dropTorch(bool burnout) {
770770
if(sk==nullptr)
771771
return;
772772

773-
const char* overlay = "HUMANS_TORCH.MDS";
773+
std::string_view overlay = "HUMANS_TORCH.MDS";
774774
if(!isUsingTorch())
775775
return;
776776

@@ -3224,7 +3224,10 @@ bool Npc::aimBow() {
32243224
auto active=invent.activeWeapon();
32253225
if(active==nullptr)
32263226
return false;
3227-
return setAnim(Anim::AimBow);
3227+
if(!setAnim(Anim::AimBow))
3228+
return false;
3229+
visual.setRotation(*this,0);
3230+
return true;
32283231
}
32293232

32303233
bool Npc::shootBow(Interactive* focOverride) {

0 commit comments

Comments
 (0)