WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER);
}
-void Announce(string snd) {
- WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
- WriteByte(MSG_BROADCAST, TE_CSQC_ANNOUNCE);
- WriteString(MSG_BROADCAST, snd);
-}
-
-void AnnounceTo(entity e, string snd) {
- if (clienttype(e) == CLIENTTYPE_REAL)
- {
- msg_entity = e;
- WriteByte(MSG_ONE, SVC_TEMPENTITY);
- WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE);
- WriteString(MSG_ONE, snd);
- }
-}
-
float ClientData_Send(entity to, float sf)
{
if(to != self.owner)
WriteEntity(MSG_ONE, self);
}
- DropAllRunes(self);
MUTATOR_CALLHOOK(MakePlayerObserver);
minstagib_stop_countdown(self);
self.think = func_null;
self.nextthink = 0;
self.hook_time = 0;
- self.runes = 0;
self.deadflag = DEAD_NO;
self.angles = spot.angles;
self.angles_z = 0;
setcolor(self, stof(autocvar_sv_defaultplayercolors));
}
-void PlayerTouchExplode(entity p1, entity p2)
-{
- vector org;
- org = (p1.origin + p2.origin) * 0.5;
- org_z += (p1.mins_z + p2.mins_z) * 0.5;
-
- te_explosion(org);
-
- entity e;
- e = spawn();
- setorigin(e, org);
- RadiusDamage(e, world, g_touchexplode_damage, g_touchexplode_edgedamage, g_touchexplode_radius, world, g_touchexplode_force, DEATH_TOUCHEXPLODE, world);
- remove(e);
-}
-
/*
=============
PutClientInServer
self.metertime = 0;
- self.runes = 0;
-
self.deadflag = DEAD_NO;
self.angles = spot.angles;
if(clienttype(self.owner) == CLIENTTYPE_REAL)
{
if(self.cnt <= 10)
- AnnounceTo(self.owner, strcat(ftos(self.cnt), ""));
+ { Send_Notification(NOTIF_ONE, self.owner, MSG_ANNCE, Announcer_PickNumber(self.cnt)); }
}
self.nextthink = time + 1;
self.cnt -= 1;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_DISCONNECT, self.netname);
- DropAllRunes(self);
MUTATOR_CALLHOOK(ClientDisconnect);
Portal_ClearAll(self);
max_mod = regen_mod = rot_mod = limit_mod = 1;
- if (self.runes & RUNE_REGEN)
- {
- if (self.runes & CURSE_VENOM) // do we have both rune/curse?
- {
- regen_mod = autocvar_g_balance_rune_regen_combo_regenrate;
- max_mod = autocvar_g_balance_rune_regen_combo_hpmod;
- limit_mod = autocvar_g_balance_rune_regen_combo_limitmod;
- }
- else
- {
- regen_mod = autocvar_g_balance_rune_regen_regenrate;
- max_mod = autocvar_g_balance_rune_regen_hpmod;
- limit_mod = autocvar_g_balance_rune_regen_limitmod;
- }
- }
- else if (self.runes & CURSE_VENOM)
- {
- max_mod = autocvar_g_balance_curse_venom_hpmod;
- if (self.runes & RUNE_REGEN) // do we have both rune/curse?
- rot_mod = autocvar_g_balance_rune_regen_combo_rotrate;
- else
- rot_mod = autocvar_g_balance_curse_venom_rotrate;
- limit_mod = autocvar_g_balance_curse_venom_limitmod;
- //if (!self.runes & RUNE_REGEN)
- // rot_mod = autocvar_g_balance_curse_venom_rotrate;
- }
maxh = maxh * max_mod;
//maxa = maxa * max_mod;
//maxf = maxf * max_mod;
{
self.respawn_countdown = number - 1;
if(ceil(self.respawn_time - (time + 0.5)) == number) // only say it if it is the same number even in 0.5s; to prevent overlapping sounds
- AnnounceTo(self, strcat(ftos(number), ""));
+ Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(number));
}
}
}
else
{
// Player may not join because g_maxplayers is set
- Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_PREVENT_JOIN);
+ Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
}
}
MUTATOR_CALLHOOK(PlayerUseKey);
}
-.float touchexplode_time;
-
/*
=============
PlayerPreThink
return;
}
- // FIXME from now on self.deadflag is always 0 (and self.health is never < 1)
- // so (self.deadflag == DEAD_NO) is always true in the code below
-
- if(g_touchexplode)
- if(time > self.touchexplode_time)
- if(self.classname == "player")
- if(self.deadflag == DEAD_NO)
- if not(IS_INDEPENDENT_PLAYER(self))
- FOR_EACH_PLAYER(other) if(self != other)
- {
- if(time > other.touchexplode_time)
- if(other.deadflag == DEAD_NO)
- if not(IS_INDEPENDENT_PLAYER(other))
- if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax))
- {
- PlayerTouchExplode(self, other);
- self.touchexplode_time = other.touchexplode_time = time + 0.2;
- }
- }
if(g_lms && !self.deadflag && autocvar_g_lms_campcheck_interval)
{
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_LMS_CAMPCHECK);
// FIXME KadaverJack: gibbing player here causes playermodel to bounce around, instead of eye.md3
// I wasn't able to find out WHY that happens, so I put a workaround in place that shall prevent players from being gibbed :(
- Damage(self, self, self, bound(0, autocvar_g_lms_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0');
+ if(self.vehicle)
+ Damage(self.vehicle, self, self, autocvar_g_lms_campcheck_damage * 2, DEATH_CAMP, self.vehicle.origin, '0 0 0');
+ else
+ Damage(self, self, self, bound(0, autocvar_g_lms_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0');
}
self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval;
self.lms_traveled_distance = 0;
else if(timeleft <= 10)
{
if(timeleft != self.idlekick_lasttimeleft)
- AnnounceTo(self, ftos(timeleft));
+ Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(timeleft));
self.idlekick_lasttimeleft = timeleft;
}
}