bool autocvar_g_lms_regenerate;
// main functions
-float LMS_NewPlayerLives()
+int LMS_NewPlayerLives()
{
- float fl;
- fl = autocvar_fraglimit;
- if(fl == 0)
+ int fl = floor(autocvar_fraglimit);
+ if(fl == 0 || fl > 999)
fl = 999;
// first player has left the game for dying too much? Nobody else can get in.
return 0;
if(!autocvar_g_lms_join_anytime)
- if(lms_lowest_lives < fl - autocvar_g_lms_last_join)
+ if(lms_lowest_lives < fl - max(0, floor(autocvar_g_lms_last_join)))
return 0;
return bound(1, lms_lowest_lives, fl);
void lms_Initialize()
{
- lms_lowest_lives = 9999;
+ lms_lowest_lives = 999;
}
#include <common/mutators/base.qh>
#include <common/scores.qh>
-.float lms_spectate_warning;
+// 1 when player presses F3 to spectate for the first time (he only gets a warning)
+// 2 when player goes spectator (presses F3 to spectate for the second time)
+// 3 when player disconnects
+.int lms_spectate_warning;
#define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
string autocvar_g_lms_weaponarena = "most_available";
}
// lives related defs
-float lms_lowest_lives;
-float LMS_NewPlayerLives();
+int lms_lowest_lives;
+int LMS_NewPlayerLives();