Add and track new player entity field '.score'. Used to trag score points separate from frags.

This commit is contained in:
Marco Cawthorne 2023-06-15 11:42:01 -07:00
parent 373e844305
commit 34e722a012
Signed by: eukara
GPG key ID: CE2032F0A2882A22
2 changed files with 5 additions and 0 deletions

View file

@ -209,6 +209,7 @@ PlayerPostThink(void)
player pl = (player)self;
g_grMode.PlayerPostFrame((NSClientPlayer)self);
pl.EvaluateEntity();
forceinfokey(pl, "*score", ftos(pl.score));
}
}

View file

@ -84,4 +84,8 @@ private:
NSXRInput m_xrInputHead;
NSXRInput m_xrInputLeft;
NSXRInput m_xrInputRight;
#ifdef SERVER
float score;
#endif
};