Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Some ships not moving.  (Read 2181 times)

0 Members and 1 Guest are viewing this topic.

SAS~Bombsaway

  • Choose your battles wisely.
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9213
  • A day without laughter is a day wasted
Some ships not moving.
« on: January 07, 2018, 12:17:58 PM »

I'm not sure if this has been asked but in my new BAT fully updated install, some ships and subs will not move. Any ideas?

Thanks.
Logged
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 7989
Re: Some ships not moving.
« Reply #1 on: January 07, 2018, 12:36:08 PM »

from what little info you give, it might as well be the stationaries...? ;)

come on, give an example, which module, which ships, or give a sample mission.

there has been a similar bug in a previous version but that had affected all moving ships. Mike wrote the solution for it back then.

SAS~Bombsaway

  • Choose your battles wisely.
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9213
  • A day without laughter is a day wasted
Re: Some ships not moving.
« Reply #2 on: January 07, 2018, 02:09:02 PM »

WAW3 straight out of the box. BAT updated to Pathfinder. Subs dont move even stock game subs, nor do they create an error in the log file. Do you have a link for Mike's post?
Logged
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

Gatrasz

  • Supporter
  • member
  • Offline Offline
  • Posts: 796
  • Dead but dreaming...
Re: Some ships not moving.
« Reply #3 on: January 07, 2018, 03:03:51 PM »

Hi ! It could have been this one : https://www.sas1946.com/main/index.php/topic,57028.msg630781.html#msg630781

(But this patch should be outdated with Pathfinder update)
Logged

SAS~Bombsaway

  • Choose your battles wisely.
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9213
  • A day without laughter is a day wasted
Re: Some ships not moving.
« Reply #4 on: January 07, 2018, 03:18:01 PM »

Thank you. I will ask Mike. I have updated to pathfinders so it should be fixed but maybe something got botched.
Logged
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

western0221

  • Modder
  • member
  • Offline Offline
  • Posts: 6790
  • Live in Japan
    • IL-2 itaki blog
Re: Some ships not moving.
« Reply #5 on: January 07, 2018, 08:26:14 PM »

In my testing v3.3 Pathfinder, single mission with USS Essex CV9, USS Indianapolis CA35, USS Gato (Surface) and Gato (Submerged) all running in 9km/h , and set static cameras to watch them from outside .....

They move correctly.
No error logs.
Logged

barber

  • member
  • Offline Offline
  • Posts: 376
Re: Some ships not moving.
« Reply #6 on: January 08, 2018, 02:06:49 AM »

Hi

I have just the same symptoms as Bombsaway!

Cheers
Barber
Logged

btasm

  • member
  • Offline Offline
  • Posts: 414
Re: Some ships not moving.
« Reply #7 on: January 08, 2018, 06:47:54 AM »

I think Bombsaway is correct. Randomly tested about 30 ships. The following are dead in the water:

Ger. sub Type IIB
Ger. Z class DD
MFPT
MFPIT
RN Vosper MTB

Again, this was random testing, not comprehensive.
Logged

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23561
  • Taking a timeout
    • STFU
Re: Some ships not moving.
« Reply #8 on: January 08, 2018, 07:00:49 AM »

Confirmed.
This is an EngineMod issue.
For some reason the "ShipGeneric" class shipped with EngineMod does not use latest code from Angels High Service Pack.
In particular, the marked code section (see comments) is missing apparently from the Classes' "LoadPath" method:
Code: [Select]
    private void LoadPath(SectFile sectfile, String s) {
        int i = sectfile.sectionIndex(s);
        if (i < 0) {
            throw new ActorException("Ship path: Section [" + s + "] not found");
        }
        int j = sectfile.vars(i);
        if (j < 1) {
            throw new ActorException("Ship path must contain at least 2 nodes");
        }
        this.path = new ArrayList();
        for (int k = 0; k < j; k++) {
            StringTokenizer stringtokenizer = new StringTokenizer(sectfile.line(i, k));
            float f1 = Float.valueOf(stringtokenizer.nextToken()).floatValue();
            float f2 = Float.valueOf(stringtokenizer.nextToken()).floatValue();

            // TODO: By SAS~Storebror - ATTENTION: f4 is unused, but the Token index still must be pushed forward!
//            float f4 = Float.valueOf(stringtokenizer.nextToken()).floatValue();
            stringtokenizer.nextToken();
            // ---

            double d = 0.0D;
            float f7 = 0.0F;
            if (stringtokenizer.hasMoreTokens()) {
                d = Double.valueOf(stringtokenizer.nextToken()).doubleValue();
                if (stringtokenizer.hasMoreTokens()) {
                    Double.valueOf(stringtokenizer.nextToken()).doubleValue();
                    if (stringtokenizer.hasMoreTokens()) {
                        f7 = Float.valueOf(stringtokenizer.nextToken()).floatValue();
                    }
                }
            }
            if (k >= (j - 1)) {
                d = 1.0D;
            }
            Segment segment7 = new Segment();
            segment7.posIn = new Point3d(f1, f2, 0.0D);
            if (Math.abs(d) < 0.10000000000000001D) {
                segment7.timeIn = 0L;
            } else {
                segment7.timeIn = (long) ((d * 60D * 1000D) + (d <= 0.0D ? -0.5D : 0.5D));
            }
            if ((f7 <= 0.0F) && ((k == 0) || (k == (j - 1)) || (segment7.timeIn == 0L))) {
                f7 = this.prop.SPEED;
            }
            segment7.speedIn = f7;
            this.path.add(segment7);
        }

        for (int l = 0; l < (this.path.size() - 1); l++) {
            Segment segment = (Segment) this.path.get(l);
            Segment segment1 = (Segment) this.path.get(l + 1);
            if ((segment.timeIn > 0L) && (segment1.timeIn > 0L)) {
                Segment segment2 = new Segment();
                segment2.posIn = new Point3d(segment.posIn);
                segment2.posIn.add(segment1.posIn);
                segment2.posIn.scale(0.5D);
                segment2.timeIn = 0L;
                segment2.speedIn = (segment.speedIn + segment1.speedIn) * 0.5F;
                this.path.add(l + 1, segment2);
            }
        }

        int i1 = 0;
        float f = ((Segment) this.path.get(i1)).length;
        int j1;
        for (; i1 < (this.path.size() - 1); i1 = j1) {
            j1 = i1 + 1;
            do {
                Segment segment3 = (Segment) this.path.get(j1);
                if (segment3.speedIn > 0.0D) {
                    break;
                }
                f += segment3.length;
                j1++;
            } while (true);
            if ((j1 - i1) <= 1) {
                continue;
            }
            float f3 = ((Segment) this.path.get(i1)).length;
            float f5 = ((Segment) this.path.get(i1)).speedIn;
            float f6 = ((Segment) this.path.get(j1)).speedIn;
            for (int i2 = i1 + 1; i2 < j1; i2++) {
                Segment segment6 = (Segment) this.path.get(i2);
                float f9 = f3 / f;
                segment6.speedIn = (f5 * (1.0F - f9)) + (f6 * f9);
                f += segment6.length;
            }

        }

        long l1 = 0L;
        for (int k1 = 0; k1 < (this.path.size() - 1); k1++) {
            Segment segment4 = (Segment) this.path.get(k1);
            Segment segment5 = (Segment) this.path.get(k1 + 1);
            if (k1 == 0) {
                l1 = segment4.timeIn;
            }
            segment4.posOut = new Point3d(segment5.posIn);
            segment5.posIn = segment4.posOut;
            segment4.length = (float) segment4.posIn.distance(segment5.posIn);
            float f8 = segment4.speedIn;
            float f10 = segment5.speedIn;
            float f11 = (f8 + f10) * 0.5F;
            if (segment4.timeIn > 0L) {
                if (segment4.timeIn > l1) {
                    segment4.timeIn -= l1;
                } else {
                    segment4.timeIn = 0L;
                }
            }
            if ((segment4.timeIn == 0L) && (segment5.timeIn > 0L)) {
                int j2 = (int) ((((2.0F * segment4.length) / f8) * 1000F) + 0.5F);
                j2 = (int) (j2 + l1);
                if (segment5.timeIn > j2) {
                    segment5.timeIn -= j2;
                } else {
                    segment5.timeIn = 0L;
                }
            }
            if (segment4.timeIn > 0L) {
                segment4.speedIn = 0.0F;
                segment4.speedOut = f10;
                float f12 = (((2.0F * segment4.length) / f10) * 1000F) + 0.5F;
                segment4.timeIn = l1 + segment4.timeIn;
                segment4.timeOut = segment4.timeIn + (int) f12;
                l1 = segment4.timeOut;
                continue;
            }
            if (segment5.timeIn > 0L) {
                segment4.speedIn = f8;
                segment4.speedOut = 0.0F;
                float f13 = (((2.0F * segment4.length) / f8) * 1000F) + 0.5F;
                segment4.timeIn = l1 + segment4.timeIn;
                segment4.timeOut = segment4.timeIn + (int) f13;
                l1 = segment4.timeOut + segment5.timeIn;
            } else {
                segment4.speedIn = f8;
                segment4.speedOut = f10;
                float f14 = ((segment4.length / f11) * 1000F) + 0.5F;
                segment4.timeIn = l1;
                segment4.timeOut = segment4.timeIn + (int) f14;
                l1 = segment4.timeOut;
            }
        }

        this.path.remove(this.path.size() - 1);
    }

This has to be fixed in EngineMod, latest correct sources for this class have been available on our SVN Repo for months.
Interestingly, "BigshipGeneric" class seems fine.

Cheers!
Mike
Logged
Don't split your mentality without thinking twice.

SAS~Bombsaway

  • Choose your battles wisely.
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9213
  • A day without laughter is a day wasted
Re: Some ships not moving.
« Reply #9 on: January 08, 2018, 07:48:36 AM »

Thank you everyone and Mike for narrowing this down. Hopefully Western will be able to fix it.
Logged
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

western0221

  • Modder
  • member
  • Offline Offline
  • Posts: 6790
  • Live in Japan
    • IL-2 itaki blog
Re: Some ships not moving.
« Reply #10 on: January 08, 2018, 11:12:14 AM »

Ouch.

It looks my mistake on 19th/Oct./2017 update.
I missed one of Mike's change points.

Now applied and test German Submarine / small torpedo boats OK.
Logged

SAS~Bombsaway

  • Choose your battles wisely.
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9213
  • A day without laughter is a day wasted
Re: Some ships not moving.
« Reply #11 on: January 08, 2018, 12:48:28 PM »

Thank you Western. :)
Logged
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.
Pages: [1] 2   Go Up
 

Page created in 0.071 seconds with 24 queries.