if(this.bot_attack)
IL_REMOVE(g_bot_targets, this);
this.bot_attack = false;
+ if(this.monster_attack)
+ IL_REMOVE(g_monster_targets, this);
+ this.monster_attack = false;
STAT(HUD, this) = HUD_NORMAL;
TRANSMUTE(Observer, this);
this.iscreature = false;
this.strength_finished = 0;
this.invincible_finished = 0;
this.superweapons_finished = 0;
+ this.dphitcontentsmask = 0;
this.pushltime = 0;
this.istypefrag = 0;
setthink(this, func_null);
stuffcmd(e, sprintf("\ncl_jumpspeedcap_min \"%s\"\n", autocvar_sv_jumpspeedcap_min));
stuffcmd(e, sprintf("\ncl_jumpspeedcap_max \"%s\"\n", autocvar_sv_jumpspeedcap_max));
+ stuffcmd(e, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin));
+
MUTATOR_CALLHOOK(FixClientCvars, e);
}
MUTATOR_CALLHOOK(ClientDisconnect, this);
if (CS(this).netname_previous) strunzone(CS(this).netname_previous); // needs to be before the CS entity is removed!
+ if (CS(this).weaponorder_byimpulse) strunzone(CS(this).weaponorder_byimpulse);
ClientState_detach(this);
Portal_ClearAll(this);
bot_relinkplayerlist();
if (this.clientstatus) strunzone(this.clientstatus);
- if (this.weaponorder_byimpulse) strunzone(this.weaponorder_byimpulse);
if (this.personal) delete(this.personal);
this.playerid = 0;
}
.int items_added;
+.string shootfromfixedorigin;
bool PlayerThink(entity this)
{
if (game_stopped || intermission_running) {
return false;
}
- bool have_hook = false;
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- if(this.(weaponentity).hook.state)
- {
- have_hook = true;
- break;
- }
- }
- bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
- if (have_hook) {
- do_crouch = false;
- } else if (this.waterlevel >= WATERLEVEL_SWIMMING) {
- do_crouch = false;
- } else if (this.vehicle) {
- do_crouch = false;
- } else if (STAT(FROZEN, this)) {
- do_crouch = false;
- }
+ FixPlayermodel(this);
- if (do_crouch) {
- if (!this.crouch) {
- this.crouch = true;
- this.view_ofs = STAT(PL_CROUCH_VIEW_OFS, this);
- setsize(this, STAT(PL_CROUCH_MIN, this), STAT(PL_CROUCH_MAX, this));
- // setanim(this, this.anim_duck, false, true, true); // this anim is BROKEN anyway
- }
- } else if (this.crouch) {
- tracebox(this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this), this.origin, false, this);
- if (!trace_startsolid) {
- this.crouch = false;
- this.view_ofs = STAT(PL_VIEW_OFS, this);
- setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
- }
+ if (this.shootfromfixedorigin != autocvar_g_shootfromfixedorigin) {
+ this.shootfromfixedorigin = autocvar_g_shootfromfixedorigin;
+ stuffcmd(this, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin));
}
- FixPlayermodel(this);
-
// LordHavoc: allow firing on move frames (sub-ticrate), this gives better timing on slow servers
//if(frametime)
{
if (IS_PLAYER(this)) {
if(this.death_time == time && IS_DEAD(this))
{
+ // player's bbox gets resized now, instead of in the damage event that killed the player,
+ // once all the damage events of this frame have been processed with normal size
this.maxs.z = 5;
setsize(this, this.mins, this.maxs);
}
store.v_angle = this.v_angle;
store.movement = this.movement;
}
+
+NET_HANDLE(fpsreport, bool)
+{
+ int fps = ReadShort();
+ PlayerScore_Set(sender, SP_FPS, fps);
+ return true;
+}