Vane Brain wrote:CommanderPro100 wrote:
- The maintenance tunnels generation does not use the seed inputted by the player, and instead the one manipulated by the functions "Rand" and "Rnd."
Look at the changelist of v1.0:
*Maintenance tunnels are now randomized.
The bug is that you'll almost never get the same maintenance tunnels twice on the same seed, since the random functions change the seed every time they're called. What you should do is:
Above "e\room\grid=New Grids" in UpdateEvents.bb, add:
Code: Select all
oldSeed% = RndSeed()
Local seedDec$ = ""
For i = 1 To Len(RandomSeed)
seedDec = seedDec+Asc(Mid(RandomSeed,i,1))
Next
SeedRnd Abs(Int(seedDec))
And then after the tunnels are generated, add:
With this code in place, the layout of the maintenance tunnels should be consistent for each seed.
And while I was checking the code for the seed input, I noticed something in Menu.bb:
Code: Select all
Local strtemp$ = ""
For i = 1 To Len(RandomSeed)
strtemp = strtemp+Asc(Mid(strtemp,i,1)) ;<--- this probably should be Mid(RandomSeed,i,1)
Next
SeedRnd Abs(Int(strtemp))
I think this might be making maps less random than they should, I'm not sure.
Vane Brain wrote:CommanderPro100 wrote:
- When A* pathfinding gets a status update, NPCs will not see waypoints behind doors. This can cause it turn around towards a previous waypoint before following through to the next one.
Uhm... Shaun, is it possible to fix?
I managed to fix this for the MTFs:
Code: Select all
If n\PathLocation<19 Then
If (n\Path[n\PathLocation]<>Null) And (n\Path[n\PathLocation+1]<>Null) Then
If Abs(DeltaYaw(n\Collider,n\Path[n\PathLocation]\obj))>Abs(DeltaYaw(n\Collider,n\Path[n\PathLocation+1]\obj)) Then
n\PathLocation=n\PathLocation+1
EndIf
EndIf
EndIf
Basically what this code tells the NPC to do is check if the first waypoint is right behind it based on its current orientation, and tells it to skip to the next one if that would prevent it from spinning around.