Jump to content

Duplicate Code in AR0415.BCS


Recommended Posts

There seems to be some duplicate code in the Paladin girl Plot, where it has two instances of nearly the same code, to spawn Hurgis.

 

This seems to be involved with setting cut scene mode before and after, and seems to be introduced with FixPack.

 

Er, no CR in the .tp2 - grrr, silly *NIX/MSDOS incompatability. Stupid IBM. Stupid Microsoft.

 

The AR0415.baf needs to have the second and third groups removed. If the cut scene mode is absolutely neccesary, then they should be added as a replace.

Link to comment
There seems to be some duplicate code in the Paladin girl Plot, where it has two instances of nearly the same code, to spawn Hurgis.

 

This seems to be involved with setting cut scene mode before and after, and seems to be introduced with FixPack.

 

Er, no CR in the .tp2 - grrr, silly *NIX/MSDOS incompatability.  Stupid IBM.  Stupid Microsoft.

 

The AR0415.baf needs to have the second and third groups removed.  If the cut scene mode is absolutely neccesary, then they should be added as a replace.

The blocks have the same triggers so there's no chance of the old blocks executing. Letting loose some REPLACE_TEXTUALLYs to clean up cruft is unnecessary.

Link to comment

The blocks are not identical, and both are necessary. Recall that one of the central goals of this paladin stronghold quest is to be able to differentiate the impostor from the real Hurgis (you obviously do not want to release the girl into the impostor's care).

Link to comment
The blocks are not identical and both are necessary. Recall that one of the central goals of this paladin stronghold quest is to be able to differentiate between the impostor and the real Hurgis (you obviously do not want to release the girl into the impostor's care).

 

I don't think he's talking about the fake/real spawns. Post-Fixpack, ar0415 looks like this:

IF
Dead("plass01")
Dead("plass02")
Dead("plass03")
Dead("plass04")
!Dead("PLGIRL01")
Global("PaladinGirlDead","GLOBAL",0)
Global("PaladinGirlSpawn","GLOBAL",2)
!AreaCheck("AR0416")
THEN
RESPONSE #100
 SetGlobal("PaladinGirlSpawn","GLOBAL",3)
 StartCutSceneMode()
 Wait(3)
 StartCutScene("cut26b")
END

IF
!Dead("PLGIRL01")
Global("PaladinGirlDead","GLOBAL",0)
Global("HurgisFake","GLOBAL",1)
Global("HurgisFakeSpawn","GLOBAL",0)
Global("PaladinGirlSpawn","GLOBAL",3)
THEN
RESPONSE #100
 StartCutSceneMode()
 Wait(2)
 SetGlobal("HurgisFakeSpawn","GLOBAL",1)
 CreateCreature("HURGISF",[528.353],7) // Hurgis Baltezan
 EndCutSceneMode()
END

IF
!Dead("PLGIRL01")
Global("PaladinGirlDead","GLOBAL",0)
Global("HurgisReal","GLOBAL",1)
Global("HurgisRealSpawn","GLOBAL",0)
Global("PaladinGirlSpawn","GLOBAL",3)
THEN
RESPONSE #100
 StartCutSceneMode()
 Wait(2)
 SetGlobal("HurgisRealSpawn","GLOBAL",1)
 CreateCreature("HURGISR",[528.353],7) // Hurgis Baltezan
 EndCutSceneMode()
END

(snip)

IF
Dead("plass01")
Dead("plass02")
Dead("plass03")
Dead("plass04")
!Dead("PLGIRL01")
Global("PaladinGirlDead","GLOBAL",0)
Global("PaladinGirlSpawn","GLOBAL",2)
!AreaCheck("AR0416")
THEN
RESPONSE #100
 SetGlobal("PaladinGirlSpawn","GLOBAL",3)
 Wait(5)
 StartCutSceneMode()
 StartCutScene("cut26b")
END

IF
!Dead("PLGIRL01")
Global("PaladinGirlDead","GLOBAL",0)
Global("HurgisFake","GLOBAL",1)
Global("HurgisFakeSpawn","GLOBAL",0)
Global("PaladinGirlSpawn","GLOBAL",3)
THEN
RESPONSE #100
 Wait(2)
 SetGlobal("HurgisFakeSpawn","GLOBAL",1)
 CreateCreature("HURGISF",[528.353],7) // Hurgis Baltezan
END

IF
!Dead("PLGIRL01")
Global("PaladinGirlDead","GLOBAL",0)
Global("HurgisReal","GLOBAL",1)
Global("HurgisRealSpawn","GLOBAL",0)
Global("PaladinGirlSpawn","GLOBAL",3)
THEN
RESPONSE #100
 Wait(2)
 SetGlobal("HurgisRealSpawn","GLOBAL",1)
 CreateCreature("HURGISR",[528.353],7) // Hurgis Baltezan
END

 

The first three are new, from the Fixpack, and the last three are the original blocks (which can not fire).

Link to comment

I got a lockup on the spawn of HurgisFake, which was why I reported it.

 

The code ISN'T DEAD, since, technically, there is time for Both code sets to run before the variable gets set. which I suspect caused trouble, after one of them set cutscene mode.

 

yes, I was able to load the autosave, and continue after trimming the cruft from the BCS.

Link to comment
Laziness. It was easier to EXTEND_TOP than to try and R_T all the actions around.
Ah, a reason very near and dear to my heart! ;-)

 

The code ISN'T DEAD, since, technically, there is time for Both code sets to run before the variable gets set.
This isn't true.
Link to comment
The code ISN'T DEAD, since, technically, there is time for Both code sets to run before the variable gets set.
This isn't true.

Of course you're correct; still, I got the lock-up, and when I removed the duplicate code, it went away.

 

And, moreover, it's bad form.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...