diff --git a/src/client/entities.qc b/src/client/entities.qc index 3e4da72..a661fbe 100644 --- a/src/client/entities.qc +++ b/src/client/entities.qc @@ -24,3 +24,10 @@ ClientGame_EntityUpdate(float id, float new) return TRUE; } + +void +ClientGame_EntityRemove(void) +{ + if (self.classname == "player") + Player_DestroyWeaponModel((base_player) self); +} diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index c572912..27a6dec 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -21,99 +21,6 @@ var int autocvar_sv_playerkeepalive = TRUE; void TFCGameRules::PlayerPostFrame(base_player pp) { - player pl = (player)pp; - Animation_PlayerUpdate(); - - if (autocvar_sv_playerkeepalive) - pl.SendFlags |= PLAYER_KEEPALIVE; - - if (pl.old_modelindex != pl.modelindex) - pl.SendFlags |= PLAYER_MODELINDEX; - - if (pl.old_origin[0] != pl.origin[0]) - pl.SendFlags |= PLAYER_ORIGIN; - - if (pl.old_origin[1] != pl.origin[1]) - pl.SendFlags |= PLAYER_ORIGIN; - - if (pl.old_origin[2] != pl.origin[2]) - pl.SendFlags |= PLAYER_ORIGIN_Z; - - if (pl.old_angles[0] != pl.v_angle[0]) - pl.SendFlags |= PLAYER_ANGLES_X; - - if (pl.old_angles[1] != pl.angles[1]) - pl.SendFlags |= PLAYER_ANGLES_Y; - - if (pl.old_angles[2] != pl.angles[2]) - pl.SendFlags |= PLAYER_ANGLES_Z; - - if (pl.old_velocity[0] != pl.velocity[0]) - pl.SendFlags |= PLAYER_VELOCITY; - - if (pl.old_velocity[1] != pl.velocity[1]) - pl.SendFlags |= PLAYER_VELOCITY; - - if (pl.old_velocity[2] != pl.velocity[2]) - pl.SendFlags |= PLAYER_VELOCITY_Z; - - if (pl.old_flags != pl.flags) - pl.SendFlags |= PLAYER_FLAGS; - - if (pl.old_gflags != pl.gflags) - pl.SendFlags |= PLAYER_FLAGS; - - if (pl.old_activeweapon != pl.activeweapon) - pl.SendFlags |= PLAYER_WEAPON; - - if (pl.old_items != pl.g_items) - pl.SendFlags |= PLAYER_ITEMS; - - if (pl.old_health != pl.health) - pl.SendFlags |= PLAYER_HEALTH; - - if (pl.old_armor != pl.armor) - pl.SendFlags |= PLAYER_ARMOR; - - if (pl.old_movetype != pl.movetype) - pl.SendFlags |= PLAYER_MOVETYPE; - - if (pl.old_viewofs != pl.view_ofs[2]) - pl.SendFlags |= PLAYER_VIEWOFS; - - if (pl.old_baseframe != pl.baseframe) - pl.SendFlags |= PLAYER_BASEFRAME; - - if (pl.old_frame != pl.frame) - pl.SendFlags |= PLAYER_FRAME; - - if (pl.old_a_ammo1 != pl.a_ammo1) - pl.SendFlags |= PLAYER_AMMO1; - - if (pl.old_a_ammo2 != pl.a_ammo2) - pl.SendFlags |= PLAYER_AMMO2; - - if (pl.old_a_ammo3 != pl.a_ammo3) - pl.SendFlags |= PLAYER_AMMO3; - - pl.old_modelindex = pl.modelindex; - pl.old_origin = pl.origin; - pl.old_angles = pl.angles; - pl.old_angles[0] = pl.v_angle[0]; - pl.old_velocity = pl.velocity; - pl.old_flags = pl.flags; - pl.old_gflags = pl.gflags; - pl.old_activeweapon = pl.activeweapon; - pl.old_items = pl.g_items; - pl.old_health = pl.health; - pl.old_armor = pl.armor; - pl.old_movetype = pl.movetype; - pl.old_viewofs = pl.view_ofs[2]; - pl.old_baseframe = pl.baseframe; - pl.old_frame = pl.frame; - pl.old_a_ammo1 = pl.a_ammo1; - pl.old_a_ammo2 = pl.a_ammo2; - pl.old_a_ammo3 = pl.a_ammo3; } void diff --git a/src/shared/include.src b/src/shared/include.src index 6dff5fb..9daaf5b 100644 --- a/src/shared/include.src +++ b/src/shared/include.src @@ -11,7 +11,7 @@ ../../../valve/src/shared/fx_breakmodel.qc ../../../valve/src/shared/fx_explosion.qc ../../../valve/src/shared/fx_gibhuman.qc -../../../valve/src/shared/fx_spark.qc +../../../base/src/shared/fx_spark.qc ../../../valve/src/shared/fx_impact.qc items.h diff --git a/src/shared/w_crowbar.qc b/src/shared/w_crowbar.qc index 4123d9b..cee7d7e 100644 --- a/src/shared/w_crowbar.qc +++ b/src/shared/w_crowbar.qc @@ -117,9 +117,9 @@ w_crowbar_primary(void) #ifdef SERVER if (pl.flags & FL_CROUCHING) { - Animation_PlayerTopTemp(ANIM_SHOOTCROWBAR, 0.5f); + Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f); } else { - Animation_PlayerTopTemp(ANIM_CR_SHOOTCROWBAR, 0.42f); + Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f); } sound(pl, CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM); diff --git a/src/shared/w_dbs.qc b/src/shared/w_dbs.qc index ad010f9..b6ac3f9 100644 --- a/src/shared/w_dbs.qc +++ b/src/shared/w_dbs.qc @@ -120,7 +120,7 @@ w_dbs_primary(void) #ifdef SERVER TraceAttack_FireBullets(4, pl.origin + pl.view_ofs, 14, [0.17365,0.04362], WEAPON_DBS); - Weapons_PlaySound(pl, CHAN_WEAPON, "weapons/sbarrel1.wav", 1, ATTN_NORM); + sound(pl, CHAN_WEAPON, "weapons/sbarrel1.wav", 1, ATTN_NORM); pl.shotgun_mag--; Weapons_UpdateAmmo(pl, pl.shotgun_mag, pl.ammo_shells, __NULL__); #else diff --git a/src/shared/w_umbrella.qc b/src/shared/w_umbrella.qc index 17b5fbc..e366c13 100644 --- a/src/shared/w_umbrella.qc +++ b/src/shared/w_umbrella.qc @@ -120,9 +120,9 @@ w_umbrella_primary(void) #ifdef SERVER if (pl.flags & FL_CROUCHING) { - Animation_PlayerTopTemp(ANIM_SHOOTCROWBAR, 0.5f); + Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f); } else { - Animation_PlayerTopTemp(ANIM_CR_SHOOTCROWBAR, 0.42f); + Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f); } sound(pl, CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM); diff --git a/src/shared/w_wrench.qc b/src/shared/w_wrench.qc index b37c58f..ea9c7da 100644 --- a/src/shared/w_wrench.qc +++ b/src/shared/w_wrench.qc @@ -110,9 +110,9 @@ w_wrench_primary(void) #ifdef SERVER if (pl.flags & FL_CROUCHING) { - Animation_PlayerTopTemp(ANIM_SHOOTCROWBAR, 0.5f); + Animation_PlayerTop(pl, ANIM_SHOOTCROWBAR, 0.5f); } else { - Animation_PlayerTopTemp(ANIM_CR_SHOOTCROWBAR, 0.42f); + Animation_PlayerTop(pl, ANIM_CR_SHOOTCROWBAR, 0.42f); } sound(pl, CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM);