Author Topic: New build: C20050502  (Read 10868 times)

0 Members and 1 Guest are viewing this topic.

Offline phreak

  • Gun Phreak
  • Moderator
  • 211
  • -1
Quote
Originally posted by Goober5000
It happened on several missions, but the most noticeable was one of the last few missions when you're guarding the GTVX Gorgon Cannon.  It fires in 3.6.5, but it stops firing in later builds.  I'm guessing the bug was added very soon after 3.6.5 was released.


I traced through the fire-beam sexp in the gorgon cannon mission.  It gets to beam_ok_to_fire() in beam_fire() then bails since the cruiser is outside of the fov of the turret.  then again, when i check the turret fov, it says 0.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
...

Okay, so why is it different?  Is this the same thing as Bobboau's fire-through-hull fix?  That better not have been added back in again...

If the turret fov is 0, though, that's rather odd.  Can you checkout the CVS from 3.6.5 and step through that code?

 

Offline phreak

  • Gun Phreak
  • Moderator
  • 211
  • -1
could it be that there's a problem with the subsystem copying methods?  the thing with beam_fire() also is that its completely independent of the AI system, hence why you can have two beams fire at once out of different turrets.
« Last Edit: May 10, 2005, 01:17:35 pm by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline phreak

  • Gun Phreak
  • Moderator
  • 211
  • -1
Quote
Originally posted by Goober5000
...

Okay, so why is it different?  Is this the same thing as Bobboau's fire-through-hull fix?  That better not have been added back in again...

If the turret fov is 0, though, that's rather odd.  Can you checkout the CVS from 3.6.5 and step through that code?


actually the true fov is cos-1(0)=90, so that fits.

results
Code: [Select]

365
=============================
- aim_dir {...}
- xyz {...}
x -0.00291909
y -0.0317455
z -0.999492
+ a1d 0x0012b85c
- turret_dir {...}
- xyz {...}
x 0.00158776
y 0.286144
z -0.958185
+ a1d 0x0012b880

vm_vec_dotprod(aim_dir, turret_dir) = .94

.94 > 0 so beam fires



current codebase
===================
- aim_dir {...}
- xyz {...}
x -0.0110746
y -0.0243270
z -0.999643
+ a1d 0x0012b86c

- turret_dir {...}
- xyz {...}
x -0.0441259
y 0.957293
z 0.285733
+ a1d 0x0012b890
vm_vec_dotprod(&aim_dir, &turret_dir) -0.308430

-.3 < 0 so beam doesn't fire.



turret_dir is waaaay off.  The only thing that modifies it in beam_ok_to_fire() is beam_get_global_turret_gun_info(), which calls ship_get_global_turret_gun_info(), which then calls:

ship_model_start()
model_find_world_point()
model_find_world_dir()
vm_vec_normalized_dir()
ship_model_stop()

if any of those have been modified since then, thats probably your culprit.  of those i can easily rule out vm_vec_normalize_dir() since thats far more wide reaching.  model_find_world_point()/dir() also seem to be unlikely to cause this.

i also did some CVS checkouts by date, March 1st was ok.  April 1st wasn't


edit5: hey i think i found it
http://fs2source.warpcore.org/cgi-bin/cvsweb/cvsweb.cgi/fs2_open/code/model/modelread.cpp.diff?r1=2.58&r2=2.59&f=h

probably explains why turret_dir in the old code had the y&z components swapped and negated

edit6: yea that worked.  thats too much work for a 2 line bug :blah:
« Last Edit: May 10, 2005, 05:26:03 pm by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline redmenace

  • 211
Good Job
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
****.

Guess that's what I get for not booting that out when I noticed it got added in by accident. My apologies. :blah:
-C

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Hey, excellent work, Phreak. :) Thanks. :)

Well, WMC... at least your prediction was accurate.  It's two months later. :p

What do you guys think of releasing 3.6.6 at the beginning of June?

 

Offline redmenace

  • 211
You spoke to soon.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by Trivial Psychic
Any new developpments on this?  Getting a fully OGG-supportive build that works with TBP is crucial to testing for said team.  This one works with all oggs, but the crashing prevents its effective use.

Fixed.  Not sure how I missed that one during testing, likely found it but it got over-looked in the original commit.  When using OGG files si->data should be NULL so the Assert() was just in the wrong place.  I'll commit the fix later today.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Quote
Originally posted by taylor

Fixed.  Not sure how I missed that one during testing, likely found it but it got over-looked in the original commit.  When using OGG files si->data should be NULL so the Assert() was just in the wrong place.  I'll commit the fix later today.

:dizzy: :dizzy: :dizzy:
:wakka:

Thanks man!  While I'm thanking Taylor, I might as well thank Goober for the list of recently fixed bugs on Mantis, including the dock jumping with the Chronos, and the string variables with arguments.  And of course, thanks to PhReAk for the turret AI fix, and WMC for... welll, coding... and, well, just... THANKS TO ALL YOU CODERS FOR DOING WHAT YOU DO, FOR ALL OF US!!!

Next thing we need is a new build to make use of these fixes, hint, hint. ;7
« Last Edit: May 11, 2005, 06:04:21 pm by 1268 »
The Trivial Psychic Strikes Again!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Yeah. I just got about 10 mails from Mantis with resolved bugs so cheers Goober :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
You're welcome. :)