- Status: open --> closed
I noticed this first when I got a "crew stunned" result from a rotor hit and went "wait a minute, that can't be right". :) Turns out that there are presently two getCriticalEffect() methods in Tank.java, one with two parameters (roll and location) and one with three (adding a boolean "damaged by fire?" to the list). The VTOL class then only overrides the former but not the latter, and it looks to me like only the latter is even being used at the moment -- a quick usage check comes up empty on two-parameter calls (indeed, even three-parameter call only shows up once, in the Server class), and even if it was being used it just refers back to the expanded method anyway. Net result, when trying to determine critical hits to a VTOL, the code falls back on the superclass method because that's the next best match it has, and that method in turn doesn't deal with VTOL specifics.
I have a fix for this and am going to commit it momentarily -- it simply rewrites the already-extant VTOL method to three-parameter form so it can be properly called when needed (and adds an extra check it was missing). I'm also deleting the unused two-parameter method in Tank as needless clutter; if there's disagreement on this, somebody can put it back in without my losing sleep over it, but as I currently see it it just takes up space and potentially confuses future coders.