this.items = 0;
this.weapons = '0 0 0';
+ this.dual_weapons = '0 0 0';
this.drawonlytoclient = this;
this.weaponmodel = "";
}
SetSpectatee_status(this, 0);
+ this.dual_weapons = '0 0 0';
+
this.superweapons_finished = (this.weapons & WEPSET_SUPERWEAPONS) ? time + autocvar_g_balance_superweapons_time : 0;
this.items = start_items;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
.entity weaponentity = weaponentities[slot];
- if(slot == 0)
+ if(slot == 0 || autocvar_g_weaponswitch_debug == 1)
this.(weaponentity).m_switchweapon = w_getbestweapon(this, weaponentity);
else
this.(weaponentity).m_switchweapon = WEP_Null;
ClientKill_Now(this.owner);
return;
}
- else if(g_cts && this.health == 1) // health == 1 means that it's silent
+ else if(this.health == 1) // health == 1 means that it's silent
{
this.nextthink = time + 1;
this.cnt -= 1;
killtime = autocvar_g_balance_kill_delay;
- if(g_race_qualifying || g_cts)
- killtime = 0;
-
if(MUTATOR_CALLHOOK(ClientKill, this, killtime))
return;
+ killtime = M_ARGV(1, float);
this.killindicator_teamchange = targetteam;
if (time < this.strength_finished)
{
this.items = this.items | ITEM_Strength.m_itemid;
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, this.netname);
+ if(!g_cts)
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, this.netname);
Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_POWERUP_STRENGTH);
}
}
if (time < this.invincible_finished)
{
this.items = this.items | ITEM_Shield.m_itemid;
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SHIELD, this.netname);
+ if(!g_cts)
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SHIELD, this.netname);
Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_POWERUP_SHIELD);
}
}
if (time < this.superweapons_finished || (this.items & IT_UNLIMITED_SUPERWEAPONS))
{
this.items = this.items | IT_SUPERWEAPON;
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SUPERWEAPON_PICKUP, this.netname);
+ if(!g_cts)
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SUPERWEAPON_PICKUP, this.netname);
Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_SUPERWEAPON_PICKUP);
}
else
this.superweapons_finished = spectatee.superweapons_finished;
STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
this.weapons = spectatee.weapons;
+ this.dual_weapons = spectatee.dual_weapons;
this.vortex_charge = spectatee.vortex_charge;
this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
this.hagar_load = spectatee.hagar_load;
void SetSpectatee(entity this, entity spectatee)
{
+ if(IS_BOT_CLIENT(this))
+ return; // bots abuse .enemy, this code is useless to them
+
entity old_spectatee = this.enemy;
this.enemy = spectatee;
PutClientInServer(this);
+ if(IS_PLAYER(this))
if(teamplay && this.team != -1)
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_JOIN_PLAY_TEAM), this.netname);
else
}
} else {
if (frametime) player_anim(this);
+
+ if (this.respawn_flags & RESPAWN_DENY)
+ {
+ STAT(RESPAWN_TIME, this) = 0;
+ return;
+ }
+
bool button_pressed = (PHYS_INPUT_BUTTON_ATCK(this) || PHYS_INPUT_BUTTON_JUMP(this) || PHYS_INPUT_BUTTON_ATCK2(this) || PHYS_INPUT_BUTTON_HOOK(this) || PHYS_INPUT_BUTTON_USE(this));
switch(this.deadflag)