Currently the InfoPlayer object in Lapper that stores information about a Player is a monolithic object and includes data for bothe the connection and the player on the racetrack. This is why when you have AIs on the track tat you get spammed with race messages as these messages are using a PLID that maps to the InfoPlayer object with the AI owners UCID instead of an individual PLID based object.
This is also proving to be a bit of an issue when trying to implement some of the new InSim functions and also when doing a car takeover.
What I would propose is to create a new InfoConnection object that contains UCID specific information and then when the player joins a race, it instances a new InfoPlayer object that is then associated with the InfoConnection object. This would only really entail splitting the current InfoPlayer object into 2 to split off the Connection specific vars and then adding handlers to do things like create InfoPlayer objects when player joins a race, receive PLID based InSim packets and other bits.
Does anyone have any arguments or opinions on doing or not doing this? My opinion is that it would make Lapper a lot more versatile, particularly if we could use AIs as race participants and treat them as unique Players with no interference with the spawners connection.
This is also proving to be a bit of an issue when trying to implement some of the new InSim functions and also when doing a car takeover.
What I would propose is to create a new InfoConnection object that contains UCID specific information and then when the player joins a race, it instances a new InfoPlayer object that is then associated with the InfoConnection object. This would only really entail splitting the current InfoPlayer object into 2 to split off the Connection specific vars and then adding handlers to do things like create InfoPlayer objects when player joins a race, receive PLID based InSim packets and other bits.
Does anyone have any arguments or opinions on doing or not doing this? My opinion is that it would make Lapper a lot more versatile, particularly if we could use AIs as race participants and treat them as unique Players with no interference with the spawners connection.