• 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!

Fixed Errors with Blunderbuss

Yes, I changed it at some time to be shoulder-mounted like musketoons etc. Something has happened.
 
If it was still OK last time you checked and you haven't touched the code since, you may want to hold off on trying to fix it.
There is some scary stuff going on with the game code right now that I'm trying to reset to a earlier state.
Maybe this got broken by the same problem that has been causing so much other weirdness.
 
Just tested this. When grabbing the blunderbuss, it does quickly jump to my hip, but then it jumps right back on my shoulder.
 
As I recall it yes. Not sure though. It was something similar with the LongRifle_C...
 
Ok, I have found what's causing this. In Character_utililite.c there's a reference "pchar_hip_mode_check"
to quests_common.c. It's only for pchar but had effect on all muskets. Not sure why I thought it necessary to add that function? :confused:
I have only /* */ it if we need to rework it later on. Merged to 23 oct status.
 

Attachments

  • JRH muskets on shoulder bugfix 15-10-23.7z
    58 KB · Views: 66
Ok, I have found what's causing this. In Character_utililite.c there's a reference "pchar_hip_mode_check"
to quests_common.c. It's only for pchar but had effect on all muskets. Not sure why I thought it necessary to add that function? :confused:
I have only /* */ it if we need to rework it later on. Merged to 23 oct status.
So this was NOT a "mystery bug" then? That's a relief!

What was that function supposed to do then? I know it got called pretty much all the time, around 2 times on each location reload, if I recall.
If we can do away with it, I'd definitely appreciate it! Or if some part of it IS needed, then perhaps we can think of an alternate solution?

What kind of effects could it have to remove this?
 
Quick test: Does seem to work better again.

Some weirdness:
- After shooting, I have not enough grapeshots left (normal as I had 3 and it uses 2)
- When opening and closing the inventory screen, the gun reloads
- This happens also on each location reload
- Firing the gun doesn't actually work in that case though
- If I do have enough shot though, opening/closing the Inventory screen does work like a cheat

Does that sound familiar to you?
 
What kind of effects could it have to remove this?
I can't tell as I really don't remember in which situation there was a problem.

It resets muskets to shoulder mode so there must have been muskets left in hip mode when not wanted.
For pchar only.

It's outcommented now and we'll have wait and see if all is ok. I hope it's an older function that no longer is needed.
 
- When opening and closing the inventory screen, the gun reloads
- This happens also on each location reload
Normal I think?

- If I do have enough shot though, opening/closing the Inventory screen does work like a cheat
Yes but it's not new?

- Firing the gun doesn't actually work in that case though
Glad to hear that it does'nt fire without enough ammo.

The guns should'nt reload if not enough ammo but I'm not sure it has to do with this thing.

The worst I saw when quick testing is if you go to another location while in fightmode (possible between jungles)
and with the gun not full charged it reloads but as it is in shoulder mode it fires in that awkward position.
I think I can try work that around in LAi_events,c
 
Here are 2 more bugfixes:

1) reloading to another location while in fightmode with a musket not charged could mean firing from shoulder mode in the next location

2) guns don't recharge without the proper amount of ammo
(also opening inventory or reloading to another location)

and yesterdays fix also included:

3) shoulder mounted muskets now stay in hip mode when going to fightmode
 

Attachments

  • JRH gun & ammo fix 15-10-24.7z
    67 KB · Views: 59
Thanks! Some queries on it though:

Code:
  if(LAi_IsFightMode(Pchar))
   {
     LAi_SetPlayerType(Pchar);
     LAi_SetFightMode(Pchar, false);
   }
^ Is that going to drop you out of fight mode on each location reload?
That may not always work out so well.... :oops:

Those changes to CharacterUtilite.c and LAi_character.c look fairly similar; could a shared function be made out of that?

Also, with just opening/closing the Inventory screen, shouldn't there be absolutely no effect on reload status altogether?
You'd only need to update that when equipping another gun, right?
 
Is that going to drop you out of fight mode on each location reload?
Yes the problem occured when reloading while in fightmode. So what could happen?

Those changes to CharacterUtilite.c and LAi_character.c look fairly similar; could a shared function be made out of that?
Maximus wrote that code a long time ago and it's spread to 4 places (Lai_fightparams too). One of them I fixed years ago but missed the others. So this could never have worked properly (until now). I say just leave it. I have tested it and it works very well.

Also, with just opening/closing the Inventory screen, shouldn't there be absolutely no effect on reload status altogether?
I agree. This "cheat" is no good and nothing I have ever wanted. Don't know where to fix it though.
 
Back
Top