Customisable Ivan Bombs have bugs - and now so do original Ivan Bombs

Bug #895076 reported by Marshall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Fix Released
Medium
DCoder DCoder

Bug Description

IvanBomb.Warhead, .Damage, .Delay and .Detachable appear to function okay.

.AttachSound and .TickingSound do not work - original Ivan still has sounds, but new unit with custom settings does not.

.Image does not work. It is always the default dynamite image. There is no "Loading Ivan image failed" message in debug.txt.

.FlickerRate does not work correctly
Without changing the default settings, original Ivan's animation now proceeds through the frames rather quickly, and then the image disappears for the remainder of the Delay.
Flicker rate appears to affect how long the animation lasts rather than the rate at which it plays the anim frames back and forth.

I'd never seen the skull frame before. As mentioned in the Features, this appears to be a bug that has been fixed by Ares, albeit introducing a new bug of the animation no longer playing for the full duration of the Delay.
I believe the problem lies with this calculation:
int frame = 2 * (Unsorted::CurrentFrame - Bomb->get_PlantingFrame()) / (pData->Ivan_Delay / pData->Ivan_Image->Frames);
Assuming original Ivan settings, at 200 frames into the Delay, frame should be calculated as 5 (and thus toggling between 5 and 6). However, using the above calculation, frame is actually calculated as 11. I think the 'multiply by 2' part should be taken out (that multiplier is only for the next line of code), although I could be wrong.

CellSpread does not work with IvanBomb warheads (to attach dynamite to multiple units simultaneously) - not sure if this was an implemented feature or not yet.

IvanBomb.DestroysBridges - is this an implemented feature? Haven't tested this as it is not mentioned in Features.txt

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Ack. Committed the source code for revision 56 moments ago, which fixes most of these. In turn:

.AttachSound and .TickingSound - seem to be fixed, though TickingSound needs to have Control=loop set in sound controls. ;Not my hack.

.Image - seems to be fixed now.

.FlickerRate and skull frame - flicker rate fixed. But the logic was hardcoded to balance out 12 frames over the charge time, instead of shp frame amount. In addition the 13th frame of the shp was not displayed. My code balances the accurate shp frame count instead of 12, which means the 13th skull frame is shown at the very end. I see these choices:
a) ignore the last frame on all SHPs
b) hardcode a check, ignore last frame only if setting to BOMBCURS.SHP
c) never ignore the last frame

CellSpread - not implemented yet, though will certainly use its own cellspread tag and might be seriously overpowered without balancing it out somehow (make rof delay proportional to the amount of objects rigged, perhaps?)

IvanBomb.DestroysBridges - not implemented yet, just a non-functional ini flag.

Revision history for this message
Marshall (m-edward) wrote :

CellSpread is inherently overpowered for IvanBombs, I think this should be up to the modder to control with the full range of IvanBomb customisations at their disposal. If you wanted to add another control to affect how many units to attach to then so be it but I don't think it is neccessary.

Regarding final frame of image, could add a flag so that user specifies how many frames are to be counted. Personally I'd say always include all frames - I quite like the skull and in any case users can always replace the SHP.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.