Infinite money bug with Multiple lasers OXP

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
ihaveamo
Above Average
Above Average
Posts: 18
Joined: Mon Feb 01, 2016 10:56 am

Infinite money bug with Multiple lasers OXP

Post by ihaveamo » Thu Nov 15, 2018 3:04 pm

Hi all! (especially Norby, in this case)

Found an infinite money bug:

If you attempt to add lasers you could a afford on a "single slot" ,but can't afford in a multi slot ... if you press enter on the "multi slot" to mount the laser, it doesn't register that you have added (because you can't afford it), but it "has", and you can then go to "Remove laser" and remove the non-existent lasers and get heaps of free money.

For example, here's how to show the issue:

Start a new game

Original cobra starts 3 forward laser mount points with this oxp.

1. I sell my pulse laser. (which gets me 3x money back as it's a 3-point pulse laser... correct functionality)

2. I now have $1200 (not real value - example)

3. I Purchase a $1000 beam laser.

3. I am now asked where to mount ... for my "forward" location, with this OXP that will cost 3000 (1000x3).

4. I don't have $3000 to mount "foward", so I should only be able to mount on aft/sides.

5. I press enter on the forward laser point, and it seems nothing happens (correct as I don't have enough money)..

6. ...but it has actualy "registered" I have added that laser, so if i now go to "Remove lasers", the forward location is lit up, and I can "remove" the laser (well, 3 virtual forward lasers), that I never purchased ... now have $4200!! (1000x3 + my initial $1200)

7. $$$ profit!

Definitely a bug.

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2543
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Infinite money bug with Multiple lasers OXP

Post by Norby » Sat Nov 17, 2018 6:11 pm

Well, Multiple Lasers OXP is just a .plist config file with laser definitions, the hard part is done by the core game so nothing to be fixed at my side.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5399
Joined: Wed Feb 28, 2007 7:54 am

Re: Infinite money bug with Multiple lasers OXP

Post by another_commander » Sat Nov 17, 2018 9:27 pm

Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.

ihaveamo
Above Average
Above Average
Posts: 18
Joined: Mon Feb 01, 2016 10:56 am

Re: Infinite money bug with Multiple lasers OXP

Post by ihaveamo » Sun Nov 18, 2018 11:23 am

another_commander wrote:
Sat Nov 17, 2018 9:27 pm
Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
Thanks, another_commander .. yes I saw it in the nightly build github before seeing it here... Now that's what I call a fast fix:) Downloading now, and will test it :)

ihaveamo
Above Average
Above Average
Posts: 18
Joined: Mon Feb 01, 2016 10:56 am

Re: Infinite money bug with Multiple lasers OXP

Post by ihaveamo » Mon Nov 19, 2018 12:06 pm

ihaveamo wrote:
Sun Nov 18, 2018 11:23 am
another_commander wrote:
Sat Nov 17, 2018 9:27 pm
Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
Thanks, another_commander .. yes I saw it in the nightly build github before seeing it here... Now that's what I call a fast fix:) Downloading now, and will test it :)

Just feeding back - Still had some issues, then I noticed two more github commits from PHKB and yourself to fix this issue. Recompiling now.

ihaveamo
Above Average
Above Average
Posts: 18
Joined: Mon Feb 01, 2016 10:56 am

Re: Infinite money bug with Multiple lasers OXP

Post by ihaveamo » Tue Nov 20, 2018 2:52 am

ihaveamo wrote:
Mon Nov 19, 2018 12:06 pm
ihaveamo wrote:
Sun Nov 18, 2018 11:23 am
another_commander wrote:
Sat Nov 17, 2018 9:27 pm
Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
Thanks, another_commander .. yes I saw it in the nightly build github before seeing it here... Now that's what I call a fast fix:) Downloading now, and will test it :)

Just feeding back - Still had some issues, then I noticed two more github commits from PHKB and yourself to fix this issue. Recompiling now.

Once I rebuilt off the nightly .git repo (and not base - oops) & tested - all fixed. Successful with Norby multilasers OXZ as well, for testing completeness (even though that wasn't the problem).

Now I'm playing with the source code. Oh no, I've gone down rabbit-hole. Working on a couple of OXZ's that may never see the light of day, but we'll see ;)

User avatar
phkb
Commodore
Commodore
Posts: 2438
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Infinite money bug with Multiple lasers OXP

Post by phkb » Tue Nov 20, 2018 3:11 am

Here, have a cookie. They're fresh-baked, a little on the dark side... :)

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5399
Joined: Wed Feb 28, 2007 7:54 am

Re: Infinite money bug with Multiple lasers OXP

Post by another_commander » Tue Nov 20, 2018 6:11 am

Image

User avatar
Svengali
---- E L I T E ----
---- E L I T E ----
Posts: 2365
Joined: Sat Oct 20, 2007 2:52 pm

Re: Infinite money bug with Multiple lasers OXP

Post by Svengali » Tue Nov 20, 2018 5:45 pm

Yummy!

Post Reply