Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on October 12, 2015, 10:50:30 am
-
Lepanto is using turret-get-secondary-ammo. It seems to have some problems.
1) is the bank counter 0-indexed or 1-indexed? (we are assuming 0)
2) the sexp always seems to return 0, no matter whether or not the turret's fired, and no matter how much ammo you put in the turret. This makes it pretty bad. I don't know if this is because the sexp is broken, or because turret ammo is broken.
The table entry of the turret being read:
$Subsystem: turret23, 4, 3.0
$Alt Subsystem Name: Torpedo Battery
$Default SBanks: ( "Eos" "Eos" "Eos" "Eos" )
$SBank Capacity: (20000, 20000, 20000, 20000)
$Turret Base RotationSnd: 256
$Turret Gun RotationSnd: 257
$Turret BaseSnd Volume: 1.0
$Turret GunSnd Volume: 1.0
$Turret Reset Delay: 15000
$Flags: ( "check hull" "reset when idle" "carry no damage" "carry shockwave" )
$animation: triggered
$type: initial
+relative_angle: 90, -90, 0
Maybe the Eos missile doesn't have a cargo size defined? Or the cargo size is huge? I'll check on that... Eos missile has a pretty normal cargo size of 2
-
I'm on 3.7.3 f32a6e7
-
Mission file: http://pastebin.com/qqdmpt7c
Table file: http://pastebin.com/R4M0m4fn
Weapon file: http://pastebin.com/wU7K1Qj1
-
Is this in a Mantis or Github ticket?
-
I haven't done one and can't until Monday, if somebody could that'd be cool
-
This should actually be working soon if not now, as we found why the third bank was reading 0, MageKing17 fixed that. As for why the rest appear as 100, that's because FRED saves ammo data as percentages.
As long as the "turret use ammo" flag is set, turrets should be using ammo.
-
Actually, quite a few of the SEXPs in that area of the code appear to be written wrong. They seem to be checking for "node" to be something different without having actually advanced it (but some get away with it because they loop and ignore invalid nodes). So the SEXP probably is broken right now.
-
Do we have this as a Git Issue or Mantis yet from the bug reporter?
Would be helpful to link to it here.
-
This was dealt with in PR 377 (https://github.com/scp-fs2open/fs2open.github.com/pull/377)
-
Great, thanks. I thought I'd seen something similar recently on our GitHub.