Author Topic: Min-Max lifetime debug message [Fixed]  (Read 2111 times)

0 Members and 1 Guest are viewing this topic.

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Min-Max lifetime debug message [Fixed]
Lifetime min or max specified, but $Lifetime was also specified; min or max will be used.
ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
fs2_open_3_6_13d_INF_SSE2-20110730_r7388.exe! <no symbol>
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 99 bytes
ntdll.dll! RtlInitializeExceptionChain + 54 bytes


Debug has been giving me this warning for a while now. It's caused by a turret having a weapon with a $min-max lifetime: defined.
However if a turret doesn't have the normal $lifetime: defined it won't shoot at all (probably because it needs lifetime*velocity to calculate what range to fire the weapon at).
So what happens is (despite what the debug message seems to say): The weapon uses $lifetime: to determine fire range, then uses $lifetime max: to determine the actual max range at which the weapon will last. (So having a lifetime set higher than the lifetime max causes the weapon to fire at targets outside of its actual range)

Old news, I'm dumb. Should have checked if this was still the case with recent builds. Aparantly it is not and the weapon actually seems to fire without lifetime defined.
« Last Edit: August 07, 2011, 10:02:29 am by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Min-Max lifetime debug message
Don't min and max have to be defined together, and if so, shouldn't max be used to calculate the range?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Re: Min-Max lifetime debug message
Looking at the code i guess you didnt define a weapon_range cause the actual distance check does min(randomrangebetweenminmax, wapon_range) so if thats 0 you allways get 0 and no turret firing
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Min-Max lifetime debug message
Don't min and max have to be defined together, and if so, shouldn't max be used to calculate the range?
I do have them defined together, it still uses $lifetime: to calculate range.

Looking at the code i guess you didnt define a weapon_range cause the actual distance check does min(randomrangebetweenminmax, wapon_range) so if thats 0 you allways get 0 and no turret firing
Pretty sure turrets don't care about +Weapon Range:
Doesn't seem to make any difference what range I set it to or if I comment the line out or not.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Re: Min-Max lifetime debug message
well min max should only be defined if theres no lifetime so thats out the window anyway, if the turret doesnt fire if you just do min max then there has to be another problem, is this a big ship or a fighter
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Min-Max lifetime debug message
Disregaaard me, I'm dumb and despite what may or may not have happened half a year ago when I first ran into this. The weapon actually works fine without $lifetime: and just min and max.

Sorry for wasting everyone's time on this.  :o
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Min-Max lifetime debug message
I feel I should bump this one more time to slightly restore my honor on this case!
What I have been experiencing (and thus led me to conclude that it wasn't working) was this:
"Rev 7432: From Valathil: Fixes a problem with a min-max lifetime smart spawn weapons where it wouldn't fire except at close range"
So there was indeed a problem, I was just too confused to identify it properly!

Anyway, Valathil was again a total baller and threw some builds at me that eventually got to the core of the matter. And its all fine and dandy now!


See? I'm not completely crazy!
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Re: Min-Max lifetime debug message [Fixed]
Fixing Spoon's problems. LIKE A BOSS
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛