if(self.killcount != -666)
{
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname);
+ if(autocvar_g_chat_nospectators == 1 || (cvar("g_warmup") && !(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
+ Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS);
if(self.just_joined == FALSE) {
LogTeamchange(self.playerid, -1, 4);
self.punchvector = '0 0 0';
self.oldvelocity = self.velocity;
self.fire_endtime = -1;
+ self.event_damage = func_null;
}
.float model_randomizer;
if(teamplay)
{
string s;
- s = Team_ColorName_Lower(self.team);
+ s = Static_Team_ColorName_Lower(self.team);
if(s != "neutral")
{
defaultmodel = cvar_string(strcat("sv_defaultplayermodel_", s));
self.event_damage = PlayerDamage;
self.bot_attack = TRUE;
+ self.monster_attack = TRUE;
+
+ self.spider_slowness = 0;
self.statdraintime = time + 5;
self.BUTTON_ATCK = self.BUTTON_JUMP = self.BUTTON_ATCK2 = 0;
if(self.killindicator_teamchange)
ClientKill_Now_TeamChange();
- // in any case:
- Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0');
+ if(IS_PLAYER(self))
+ Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0');
// now I am sure the player IS dead
}
// add a way to see what the items were BEFORE all of these checks for the mutator hook
olditems = self.items;
- if((self.items & IT_USING_JETPACK) && !self.deadflag)
+ if((self.items & IT_USING_JETPACK) && !self.deadflag && !gameover)
self.modelflags |= MF_ROCKET;
else
self.modelflags &= ~MF_ROCKET;
void player_regen (void)
{
- float minh, mina, minf, maxh, maxa, maxf, limith, limita, limitf, max_mod, regen_mod, rot_mod, limit_mod;
- maxh = autocvar_g_balance_health_rotstable;
- maxa = autocvar_g_balance_armor_rotstable;
- maxf = autocvar_g_balance_fuel_rotstable;
- minh = autocvar_g_balance_health_regenstable;
- mina = autocvar_g_balance_armor_regenstable;
- minf = autocvar_g_balance_fuel_regenstable;
- limith = autocvar_g_balance_health_limit;
- limita = autocvar_g_balance_armor_limit;
- limitf = autocvar_g_balance_fuel_limit;
-
- max_mod = regen_mod = rot_mod = limit_mod = 1;
-
- maxh = maxh * max_mod;
- //maxa = maxa * max_mod;
- //maxf = maxf * max_mod;
- minh = minh * max_mod;
- //mina = mina * max_mod;
- //minf = minf * max_mod;
- limith = limith * limit_mod;
- limita = limita * limit_mod;
- //limitf = limitf * limit_mod;
-
- if(g_ca)
- rot_mod = 0;
-
- if (!g_minstagib && !g_ca && (!g_lms || autocvar_g_lms_regenerate))
+ if(!MUTATOR_CALLHOOK(PlayerRegen))
{
+ float minh, mina, maxh, maxa, limith, limita, max_mod, regen_mod, rot_mod, limit_mod;
+ maxh = autocvar_g_balance_health_rotstable;
+ maxa = autocvar_g_balance_armor_rotstable;
+ minh = autocvar_g_balance_health_regenstable;
+ mina = autocvar_g_balance_armor_regenstable;
+ limith = autocvar_g_balance_health_limit;
+ limita = autocvar_g_balance_armor_limit;
+
+ max_mod = regen_mod = rot_mod = limit_mod = 1;
+
+ maxh = maxh * max_mod;
+ minh = minh * max_mod;
+ limith = limith * limit_mod;
+ limita = limita * limit_mod;
+
self.armorvalue = CalcRotRegen(self.armorvalue, mina, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxa, autocvar_g_balance_armor_rot, autocvar_g_balance_armor_rotlinear, rot_mod * frametime * (time > self.pauserotarmor_finished), limita);
self.health = CalcRotRegen(self.health, minh, autocvar_g_balance_health_regen, autocvar_g_balance_health_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxh, autocvar_g_balance_health_rot, autocvar_g_balance_health_rotlinear, rot_mod * frametime * (time > self.pauserothealth_finished), limith);
-
- // if player rotted to death... die!
- if(self.health < 1)
- self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
}
+ // if player rotted to death... die!
+ // check this outside above checks, as player may still be able to rot to death
+ if(self.health < 1)
+ self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
+
if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
- self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, rot_mod * frametime * (time > self.pauserotfuel_finished), limitf);
+ {
+ float minf, maxf, limitf;
+
+ maxf = autocvar_g_balance_fuel_rotstable;
+ minf = autocvar_g_balance_fuel_regenstable;
+ limitf = autocvar_g_balance_fuel_limit;
+
+ self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
+ }
}
float zoomstate_set;
float currentlyPlaying = 0;
FOR_EACH_REALCLIENT(e)
- if(IS_PLAYER(e) || e.caplayer == 1)
+ if(IS_PLAYER(e) || e.caplayer)
currentlyPlaying += 1;
if(currentlyPlaying < autocvar_g_maxplayers)
* g_maxplayers_spectator_blocktime seconds
*/
void checkSpectatorBlock() {
- if(IS_SPEC(self) || IS_OBSERVER(self)) {
+ if(IS_SPEC(self) || IS_OBSERVER(self))
+ if(!self.caplayer)
+ if(IS_REAL_CLIENT(self))
+ {
if( time > (self.spectatortime + autocvar_g_maxplayers_spectator_blocktime) ) {
Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
dropclient(self);
// secret status
secrets_setstatus();
+ // monsters status
+ monsters_setstatus();
+
self.dmg_team = max(0, self.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
//self.angles_y=self.v_angle_y + 90; // temp