Updated to include exported dependencies.
This plugin gives easy access to information from the player so you don't have to get all the data yourself. The data is mostly collected using the following classes:
Please report any issues or provide suggestions here: https://github.com/thommie-echo/TMNext-PlayerState
PlayerState::sTMData@ TMData = PlayerState::GetRaceData();
if(TMData.dEventInfo.FinishRun)
print("Finished at: " + TMData.dPlayerInfo.EndTime);
This then gives access to the following (available both in single and multiplayer).
int EndTime // End time of the current run, see also IsFinish to see whether the time is a result of a finish or a reset
uint RaceWaypointTimes // Array of checkpoint times of the player
uint NumberOfCheckpointsPassed // This is actually the same as the length of RaceWaypointTimes
uint CurrentLapNumber
int CurrentRaceTime
int LapStartTime
uint LatestCPTime // The time of the latest CP passed by the player
uint RespawnTime
uint NbRespawnsRequested
int StartTime // CSmPlayer.ScriptAPI; in GameTime
vec3 Position // CSmPlayer.ScriptAPI
float AimYaw // CSmPlayer.ScriptAPI
float AimPitch // CSmPlayer.ScriptAPI
vec3 AimDirection // CSmPlayer.ScriptAPI
vec3 Velocity // CSmPlayer.ScriptAPI
float Speed // CSmPlayer.ScriptAPI
string Login // CSmPlayer.ScriptAPI
string Name // CSmPlayer.ScriptAPI
int LatestCheckpointLandmarkIndex // CSmPlayer; starts at the maximum number of checkpoints + finish + start, after first cp goes to 0 and up from there
Updated to include exported dependencies.
Breaking changes:
This should fix the game crashing when playing COTD and the game slowing down after playing for a long time or on large servers.