View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001950 | FSSCP | --------- | public | 2009-07-03 23:09 | 2009-12-18 09:46 |
Reporter | KeldorKatarn | Assigned To | karajorma | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | IBM PC | OS | Windows | OS Version | Vista SP1 |
Product Version | 3.6.11 | ||||
Fixed in Version | 3.6.11 | ||||
Summary | 0001950: primary-fired-since and secondary-fired-since trigger when bank is selected | ||||
Description | both SEXPs basically work, but they have a bug. This is how they work in the code (relevant lines) last_fired = shipp->weapons.next_primary_fire_stamp[requested_bank] - (int)(wip->fire_wait * 1000); if (timestamp() - delay < last_fired) { return SEXP_TRUE; } This is all fine to determine the time the gun was fired the last time.. except for one thing... next_primary_fire_stamp is always set to NOW whenever the weapon bank is selected by the player, which is logical since that's the time he can fire it the next time. | ||||
Steps To Reproduce | If you have an event that sends a message like "Fox 2" if a missile was fired in the last 2 seconds, that message is already sent as soon as that missile bank is activated/selected. If it is the standard bank the message will most likely be sent right on mission start already. | ||||
Additional Information | You better do not rely on the "when can I fire the weapon the next time" timestamp but rather add a new timestamp "fired last" to the weapon info scruct. This is much more relyable, although it's more work to code. Working with additional checks to make the existing code work is very hard to test and will be hard to maintain. | ||||
Tags | No tags attached. | ||||
|
I was unaware it did that. But if that's the case then yeah I'm going to need to add another timestamp. |
|
wasn't this already fixed? |
|
Don't think so. I guess I forgot about it cause I didn't assign it to myself. I'll try to look at it this weekend. |
|
Back then you showed me a build in which it works and in current nightly builds the bug isn't present anymore. I'm pretty sure you already did this. |
|
Yeah, it's fixed. I didn't look back far enough when I checked if I'd fixed it. :D |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-07-03 23:09 | KeldorKatarn | New Issue | |
2009-07-04 06:56 | karajorma | Note Added: 0011046 | |
2009-12-10 06:46 | KeldorKatarn | Note Added: 0011394 | |
2009-12-17 09:42 | karajorma | Status | new => assigned |
2009-12-17 09:42 | karajorma | Assigned To | => karajorma |
2009-12-17 09:43 | karajorma | Note Added: 0011426 | |
2009-12-17 14:53 | KeldorKatarn | Note Added: 0011427 | |
2009-12-18 09:46 | karajorma | Note Added: 0011429 | |
2009-12-18 09:46 | karajorma | Status | assigned => resolved |
2009-12-18 09:46 | karajorma | Fixed in Version | => 3.6.11 |
2009-12-18 09:46 | karajorma | Resolution | open => fixed |