Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: bigchunk1 on July 28, 2011, 09:09:19 pm
-
I am making a custom mod. As much as I progress as I'm making with it, this most irritating bug rears itself and cuts the game. I have no idea what causes it and it refuses to go away despite my best efforts.
Debug log here (http://pastebin.com/gvNftjq0)
Things you should know:
This mod uses subspace missiles
This mod has a custom aiprofiles.tbl
The player is being impacted by subspace missiles at the time of the assert
The player is in the game at the time of the assert
This assert has taken place across multiple missions whenever subspace missiles are used.
This debug run takes place near the very beginning of a mission (Not the only case!)
The problem seems to happen in the aicode.cpp. If anyone could even provide the slightest insight as to what's going on, perhaps I could find a way to fix or avert it. If a CODER (only!) would like to see a test version of the mod for debugging purposes, please PM me.
-
Fundamentally it seems the problem is the weapon that is hitting the player does not have a parent. Not being familiar with how subspace missiles are implemented I don't know if it is possible to give them a parent. Whoever re-enabled subspace missiles (The E, IIRC), would be more qualified to comment.
-
The subspace missiles are called by a tag missile which is created using 'weapon create'. That tag weapon has been assigned a parent 'Ship', which is unkillable and persistant throughout the mission.
Here is the table for that ship:
$Name: Empty
$Short name: Ptracker ;;just a crutch to fight FRED with
$Species: Terran
$POF file: Empty.pof
;Detail distance is Irrelevant
$Density: 1
$Damp: 0.2
$Rotdamp: 0.2
$Max Velocity: 0.0, 0.0, 0.2
$Rotation time: 20.0, 20.0, 20.0
$Rear Velocity: 0.0
$Forward accel: 0.0
$Forward decel: 0.0
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 0.0
$Expl outer rad: 0.0
$Expl damage: 0.0
$Expl blast: 0.0
$Expl Propagates: NO ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed: 0.0 ;; speed shockwave expands at, 0 means no shockwave
$Default PBanks: ()
$Default SBanks: ()
$SBank Capacity: ()
$Shields: 0
$Power Output: 0.0
$Max Oclk Speed: 0.0
$Max Weapon Eng: 0.0
$Hitpoints: 100
$Armor Type: Normalspace
$Flags: ("no_collide" "cruiser") ;;cruiser to make AI know what it's attacking in the Sapphire mission
$AI Class: Grunt
$Afterburner: NO
$Countermeasures: 0
$Scan time: 2000
$Closeup_pos: 0.0, 1.0, -28
$Closeup_zoom: 0.5
-
Fundamentally it seems the problem is the weapon that is hitting the player does not have a parent. Not being familiar with how subspace missiles are implemented I don't know if it is possible to give them a parent. Whoever re-enabled subspace missiles (The E, IIRC), would be more qualified to comment.
I definitely had nothing to do with enabling them. I will look into it though.
-
Fundamentally it seems the problem is the weapon that is hitting the player does not have a parent. Not being familiar with how subspace missiles are implemented I don't know if it is possible to give them a parent. Whoever re-enabled subspace missiles (The E, IIRC), would be more qualified to comment.
I definitely had nothing to do with enabling them. I will look into it though.
Really? Who did then? If you don't get to it I will look at it next week.
-
<IRC>
The_E: Oh this one is going to suck
bigchunk1: Huh?
The_E: The problem is this
The_E: Weapons fired as part of an SSM strike do not have a parent that the hit can be attributed to
bigchunk1: What about the parent specified by weapon create... no good?
The_E: Nope, that won't get propagated down.
bigchunk1: :(
bigchunk1: BP used weapon create I thought...
The_E: Yes, but never against the player ship
bigchunk1: aah
bigchunk1: damn
The_E: This bug specifically concerns the player being hit
<IRC>
EDIT: The_E made a test build which seems to have fixed the error! Isn't that wonderful? I'm going to keep testing with it and let you all know if anything comes up.
-
Really? Who did then? If you don't get to it I will look at it next week.
SSM missiles were, IIRC, always present in FreeSpace 2 Open, dating back to retail. They were never disabled in first place, just never used by :v:.
-
It was Bobboau who figured out how to use them, way back in 2002. I thought he had to make some minor code changes, but I forget what (if anything) they were.