#include "cl_client.qh"
-#include "waypointsprites.qh"
-
#include "anticheat.qh"
#include "cl_impulse.qh"
#include "cl_player.qh"
#include "bot/bot.qh"
#include "bot/navigation.qh"
-#include "../common/vehicles/sv_vehicles.qh"
+#include "../common/vehicles/all.qh"
#include "weapons/hitplot.qh"
#include "weapons/weaponsystem.qh"
#include "../common/net_notice.qh"
#include "../common/physics.qh"
+#include "../common/items/all.qc"
+
+#include "../common/mutators/mutator/waypointsprites.qh"
+
#include "../common/triggers/subs.qh"
#include "../common/triggers/triggers.qh"
#include "../common/triggers/trigger/secret.qh"
entity spot;
self.hud = HUD_NORMAL;
- if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+ if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
spot = SelectSpawnPoint (true);
if(!spot)
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))
+ if(!intermission_running)
+ if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS);
if(self.just_joined == false) {
// reset player keys
self.itemkeys = 0;
- MUTATOR_CALLHOOK(PutClientInServer);
+ MUTATOR_CALLHOOK(PutClientInServer, self);
if(gameover)
self.classname = "observer";
Unfreeze(self);
- spawn_spot = spot;
- MUTATOR_CALLHOOK(PlayerSpawn);
+ MUTATOR_CALLHOOK(PlayerSpawn, spot);
if(autocvar_spawn_debug)
{
self = oldself;
}
- MUTATOR_CALLHOOK(ClientConnect);
+ MUTATOR_CALLHOOK(ClientConnect, self);
}
/*
=============
PlayerStats_GameReport_FinalizePlayer(self);
- if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+ if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
CheatShutdownClient();
self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
self.effects |= CSQCMODEL_EF_RESPAWNGHOST;
- pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
+ Send_Effect("respawn_ghost", self.origin, '0 0 0', 1);
if(autocvar_g_respawn_ghosts_maxtime)
SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
}
void player_powerups (void)
{
// add a way to see what the items were BEFORE all of these checks for the mutator hook
- olditems = self.items;
+ int items_prev = self.items;
if((self.items & IT_USING_JETPACK) && !self.deadflag && !gameover)
self.modelflags |= MF_ROCKET;
if (!g_instagib)
{
- if (self.items & IT_STRENGTH)
+ if (self.items & ITEM_Strength.m_itemid)
{
play_countdown(self.strength_finished, "misc/poweroff.wav");
self.effects = self.effects | (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
if (time > self.strength_finished)
{
- self.items = self.items - (self.items & IT_STRENGTH);
+ self.items = self.items - (self.items & ITEM_Strength.m_itemid);
//Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERDOWN_STRENGTH, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_STRENGTH);
}
{
if (time < self.strength_finished)
{
- self.items = self.items | IT_STRENGTH;
+ self.items = self.items | ITEM_Strength.m_itemid;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_STRENGTH, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_STRENGTH);
}
}
- if (self.items & IT_INVINCIBLE)
+ if (self.items & ITEM_Shield.m_itemid)
{
play_countdown(self.invincible_finished, "misc/poweroff.wav");
self.effects = self.effects | (EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
if (time > self.invincible_finished)
{
- self.items = self.items - (self.items & IT_INVINCIBLE);
+ self.items = self.items - (self.items & ITEM_Shield.m_itemid);
//Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERDOWN_SHIELD, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SHIELD);
}
{
if (time < self.invincible_finished)
{
- self.items = self.items | IT_INVINCIBLE;
+ self.items = self.items | ITEM_Shield.m_itemid;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_SHIELD, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SHIELD);
}
if (time < self.spawnshieldtime)
self.effects = self.effects | (EF_ADDITIVE | EF_FULLBRIGHT);
- MUTATOR_CALLHOOK(PlayerPowerups);
+ MUTATOR_CALLHOOK(PlayerPowerups, self, items_prev);
}
float CalcRegen(float current, float stable, float regenfactor, float regenframetime)
{
float max_mod, regen_mod, rot_mod, limit_mod;
max_mod = regen_mod = rot_mod = limit_mod = 1;
- regen_mod_max = max_mod;
- regen_mod_regen = regen_mod;
- regen_mod_rot = rot_mod;
- regen_mod_limit = limit_mod;
- if(!MUTATOR_CALLHOOK(PlayerRegen))
+ if(!MUTATOR_CALLHOOK(PlayerRegen, max_mod, regen_mod, rot_mod, limit_mod))
if(!self.frozen)
{
float minh, mina, maxh, maxa, limith, limita;
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);
+ 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 & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
}
}
*/
void SpectateCopy(entity spectatee) {
- other = spectatee;
- MUTATOR_CALLHOOK(SpectateCopy);
+ MUTATOR_CALLHOOK(SpectateCopy, spectatee, self);
self.armortype = spectatee.armortype;
self.armorvalue = spectatee.armorvalue;
self.ammo_cells = spectatee.ammo_cells;
self.stat_allow_oldvortexbeam = autocvar_g_allow_oldvortexbeam;
self.stat_leadlimit = autocvar_leadlimit;
+ self.weaponsinmap = weaponsInMap;
+
if(frametime)
{
// physics frames: update anticheat stuff
if(frametime)
{
- if(self.weapon == WEP_VORTEX && WEP_CVAR(vortex, charge))
+ if(self.weapon == WEP_VORTEX.m_id && WEP_CVAR(vortex, charge))
{
self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.vortex_charge / WEP_CVAR(vortex, charge_animlimit));
self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.vortex_charge / WEP_CVAR(vortex, charge_animlimit));
// WEAPONTODO: THIS SHIT NEEDS TO GO EVENTUALLY
// It cannot be predicted by the engine!
- if((self.weapon == WEP_SHOCKWAVE || self.weapon == WEP_SHOTGUN) && self.weaponentity.wframe == WFRAME_FIRE2 && time < self.weapon_nextthink)
+ if((self.weapon == WEP_SHOCKWAVE.m_id || self.weapon == WEP_SHOTGUN.m_id) && self.weaponentity.wframe == WFRAME_FIRE2 && time < self.weapon_nextthink)
do_crouch = 0;
if (do_crouch)
W_WeaponFrame();
self.items_added = 0;
- if(self.items & IT_JETPACK)
- if(self.items & IT_FUEL_REGEN || self.ammo_fuel >= 0.01)
+ if(self.items & ITEM_Jetpack.m_itemid)
+ if(self.items & ITEM_JetpackRegen.m_itemid || self.ammo_fuel >= 0.01)
self.items_added |= IT_FUEL;
self.items |= self.items_added;
// WEAPONTODO: Add weapon request for this
if(!zoomstate_set)
- SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_VORTEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_RIFLE && WEP_CVAR(rifle, secondary) == 0)); // WEAPONTODO
+ SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_VORTEX.m_id) || (self.BUTTON_ATCK2 && self.weapon == WEP_RIFLE.m_id && WEP_CVAR(rifle, secondary) == 0)); // WEAPONTODO
float oldspectatee_status;
oldspectatee_status = self.spectatee_status;