• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Included in Build New musket types

I hear Sharpe clicking quite often yes. Had only him as officer. But I can imagine with a hole group.
Enemies don't click. But it's enough with the officers.
Sharpe tries to get the musket on hip but realize it's not loaded and back to the back it is.

So... I think it's best to skip all officers sounds and use pchar's sound only when not in arcade mode.
I'll fix that until tomorrow.
 
Sharpe tries to get the musket on hip but realize it's not loaded and back to the back it is.
If that happens, can the hip/back/hip/back process not be aborted? Or at least have at least the sound skipped?

This seems to be an indication of the code doing a bit more than it is meant to do and should be required to.
So a bit of optimizing wouldn't be amiss?

Actually, looking at that code, I see a lot of functions that look very similar to other related functions.
Could they not be merged into one and the function will internally determine what weapon needs swapping?
 
It was diffcult to get everything right so I had to add more checks to guarantee an ok behaviour with those muskets.
It works rather well at the moment so I would say: just skip the officers sounds and hardly anyone will notice there's some flippng back and forth with muskets..

The officers sounds were not that important anyway.
 
Simply this then?
Code:
  if(IsMainCharacter(attack)) { PlaySound("OBJECTS\DUEL\reload1.wav"); }
   //else { if(IsOfficer(attack)) PlaySound("INTERFACE\button1.wav"); }
 
Yes, and maybe the arcade mode check too:

if(IsMainCharacter(attack) && iRealismMode != 0) PlaySound("OBJECTS\DUEL\reload1.wav");

Not sure how Ironman mode works though. Does your gun reload while fighting here too?
 
Not sure how Ironman mode works though. Does your gun reload while fighting here too?
Iron Man is one realism level further up. This is the code that is normally used to check the "cannot reload while fighting" status:
Code:
  bool bCannotReload = CANNOT_RELOAD_WHILE_FIGHTING == 1 && iRealismMode>0;
   if (CANNOT_RELOAD_WHILE_FIGHTING == 2)   bCannotReload = true; // PB: To allow CANNOT_RELOAD_WHILE_FIGHTING to override the Realism Mode
   if (bCannotReload)
 
Oh, if you want to use that a lot of times, please be sure to make it a function.
Otherwise we'll end up with the same lines of code far too many times. :facepalm
 
Do I get it right that it's only in arcade mode we want to avoid the reload1.wav sound?
 
Do I get it right that it's only in arcade mode we want to avoid the reload1.wav sound?
You tell me? I thought you wanted to have it linked to the "cannot reload while fighting" behaviour?
That can be linked to realism mode, but ALSO be overridden with an InternalSettings.h toggle.
Just to make it simple. :facepalm
 
Actually, looking at that code, I see a lot of functions that look very similar to other related functions.
Could they not be merged into one and the function will internally determine what weapon needs swapping?
It's on my to-do-list.
 
It's on my to-do-list.
This would be my suggestion:
1. Make a function to check the status of the "reload while fighting" functionality:
Code:
bool DisableReloadWhileFighting() // PB: To allow CANNOT_RELOAD_WHILE_FIGHTING to override the Realism Mode
{
   if (CANNOT_RELOAD_WHILE_FIGHTING == 0)   return false;
   if (CANNOT_RELOAD_WHILE_FIGHTING == 2)   return true;
   if (iRealismMode>0)             return true;
                       return false;
}
2. Use that to control the actual feature:
Code:
  if (DisableReloadWhileFighting())
   {
     if(LAi_IsFightMode(chr) && !CheckAttribute(blade,"enblrld") && !CheckAttribute(gun,"enblrld") && !CheckAttribute(gun,"throw"))  return 0.0;
   }
3. Use that to control the sound too:
Code:
if(IsMainCharacter(attack) && DisableReloadWhileFighting()) PlaySound("PEOPLE\clothes1.wav");

Did I understand your intention correctly there or am I missing something? :oops:
 
I was thinking of
Code:
//JRH -->
#event_handler("mket_on_hip", "hip_mket");
void hip_mket()
.....
{
all these evenhandler cases in quests_common.

The only thing that differs are the id of the muskets. Must be possible to merge into one function.
Called from LAi-fight and seadogs. Also clean up in those of course.
I'll give it a try one day.

- - - - - - - - -

Muskets clicking:
I made it easy for myself and used only
Code:
if(IsMainCharacter(attack) && iRealismMode != 0) PlaySound("OBJECTS\DUEL\reload1.wav");
Hope it covers it.
 
I was thinking of
Code:
//JRH -->
#event_handler("mket_on_hip", "hip_mket");
void hip_mket()
.....
{
all these evenhandler cases in quests_common.

The only thing that differs are the id of the muskets. Must be possible to merge into one function.
Called from LAi-fight and seadogs. Also clean up in those of course.
I'll give it a try one day.
That's what I was thinking. Easiest might be to simply check the ID of the equipped gun inside the function itself?

Muskets clicking:
I made it easy for myself and used only
Code:
if(IsMainCharacter(attack) && iRealismMode != 0) PlaySound("OBJECTS\DUEL\reload1.wav");
Hope it covers it.
Well, if you agree with my above proposal, you don't need to actually do it because I already did.
Took only five minutes or so. ;)
 
Back
Top