Page 1 of 1

[BUG?] RaceGhost_... functions weird behavior

Posted: 22 Oct 2019, 04:14
by Nerpson
Hello,

I'm currently developing the TimeAttack mode for the Race campaign of TMOne Alpine². When working on the replay after finishing a race, I encountered various important issues, preventing me to finish the mode...
The functions prefixed by RaceGhost_ in the CTmMode context class have a strange behavior.

RaceGhost_RemoveAll() as well as RaceGhost_Remove(Ident) seems not to work, the replay already spawned are still on the map.
RaceGhost_AddWithOffset(Ident, Integer) is not a deterministic function. It does not produce the same result with the same arguments. The first time I use it, the replay is well spawned, the second time it's not.
Raceghost_IsReplayover(Ident) throws an error no matter what
Image

Thanks for your consideration

Re: [BUG?] RaceGhost_... functions weird behavior

Posted: 22 Oct 2019, 07:39
by Eole
The RaceGhost_AddXXX() functions all return an Ident. This Ident is different than the one of the Ghost you pass in parameter. All other RaceGhost_XXX() functions that take an Ident as parameter must use the Ident returned by RaceGhost_AddXXX() and not the Ghost.Id directly.

Re: [BUG?] RaceGhost_... functions weird behavior

Posted: 22 Oct 2019, 13:52
by Nerpson
Hello Eole,

Indeed, the documentation has GhostInstId written has parameter name, so I already tried with this Ident. In facts, I tried with both the returned Ident and the CGhost Ident already.

Edit: For RaceGhost_AddWithOffset(), I tried to spawn a lot of ghosts with various delay values, no car is spawned. So I guess it's a bug.

Code: Select all

for (I, 0, 100) {
	RaceGhost_AddWithOffset(ScoreMgr.Playground_GetPlayerGhost(Players[0]), I*1000); //< I also tried negative values
}

Re: [BUG?] RaceGhost_... functions weird behavior

Posted: 22 Oct 2019, 16:34
by Nerpson
New issue discovered: RaceGhost_Add(Ghost, True); is not deterministic as well. Sometimes work (ghost is transparent), sometimes not (nothing). When passing False, it works 100% of the tries. With True, you can cross your fingers.

Re: [BUG?] RaceGhost_... functions weird behavior

Posted: 22 Oct 2019, 17:34
by Nerpson
Another issue found: (2 pics, use arrows on the embed)


The avatar of the ghosts are messed up. It sometimes seems to keep the last ghost's avatar.