Remove view.qc and modelevent.qc
This commit is contained in:
parent
c3bcb95b95
commit
61e68af73c
30 changed files with 55 additions and 73 deletions
|
@ -30,7 +30,6 @@ cmds.qc
|
|||
game_event.qc
|
||||
../../../valve/src/client/camera.qc
|
||||
../../../valve/src/client/viewmodel.qc
|
||||
view.qc
|
||||
crosshair.qc
|
||||
../../../valve/src/client/obituary.qc
|
||||
../../../valve/src/client/hud_dmgnotify.qc
|
||||
|
@ -40,7 +39,6 @@ hud_weaponselect.qc
|
|||
../../../valve/src/client/hud_sprite.qc
|
||||
../../../valve/src/client/scoreboard.qc
|
||||
radio.qc
|
||||
../../../valve/src/client/modelevent.qc
|
||||
|
||||
../../../src/client/include.src
|
||||
vgui_buypages.qc
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
View_UpdateWeapon(player pl, entity vm, entity mflash)
|
||||
{
|
||||
/* only bother upon change */
|
||||
if (pSeat->m_iLastWeapon == pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
pSeat->m_iOldWeapon = pSeat->m_iLastWeapon;
|
||||
pSeat->m_iLastWeapon = pl.activeweapon;
|
||||
|
||||
if (!pl.activeweapon) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* we forced a weapon call outside the prediction,
|
||||
* thus we need to update all the net variables to
|
||||
* make sure these updates are recognized. this is
|
||||
* vile but it'll have to do for now */
|
||||
SAVE_STATE(pl.w_attack_next)
|
||||
SAVE_STATE(pl.w_idle_next)
|
||||
SAVE_STATE(pl.viewzoom)
|
||||
SAVE_STATE(pl.weapontime)
|
||||
SAVE_STATE(pl.weaponframe)
|
||||
|
||||
/* hack, we changed the wep, move this into Game_Input/PMove */
|
||||
Weapons_Draw(pl);
|
||||
|
||||
/* we forced a weapon call outside the prediction,
|
||||
* thus we need to update all the net variables to
|
||||
* make sure these updates are recognized. this is
|
||||
* vile but it'll have to do for now */
|
||||
ROLL_BACK(pl.w_attack_next)
|
||||
ROLL_BACK(pl.w_idle_next)
|
||||
ROLL_BACK(pl.viewzoom)
|
||||
ROLL_BACK(pl.weapontime)
|
||||
ROLL_BACK(pl.weaponframe)
|
||||
|
||||
/* figure out when the attachments start. in FTE attachments for
|
||||
* HLMDL are treated as bones. they start at numbones + 1 */
|
||||
skel_delete(mflash.skeletonindex);
|
||||
mflash.skeletonindex = skel_create(vm.modelindex);
|
||||
pSeat->m_iVMBones = skel_get_numbones(mflash.skeletonindex) + 1;
|
||||
|
||||
if (getplayerkeyfloat(pl.entnum-1, "*team") == TEAM_CT) {
|
||||
setcustomskin(pSeat->m_eViewModel, "", "geomset 0 2\ngeomset 1 1\n");
|
||||
} else {
|
||||
setcustomskin(pSeat->m_eViewModel, "", "geomset 0 1\ngeomset 1 2\n");
|
||||
}
|
||||
}
|
|
@ -138,6 +138,7 @@ w_ak47_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 4;
|
||||
pl.cs_cross_deltadist = 4;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ w_aug_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 3;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ w_awp_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -101,6 +101,10 @@ w_c4bomb_draw(player pl)
|
|||
Weapons_SetModel("models/v_c4.mdl");
|
||||
Weapons_ViewAnimation(pl, C4_DRAW);
|
||||
pl.mode_temp = 0;
|
||||
|
||||
#ifdef CLIENT
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -136,6 +136,7 @@ w_deagle_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -159,6 +159,7 @@ w_elites_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 4;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_fiveseven_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,10 @@ w_flashbang_draw(player pl)
|
|||
Weapons_SetModel("models/v_flashbang.mdl");
|
||||
Weapons_ViewAnimation(pl, FLASHBANG_DRAW);
|
||||
pl.mode_temp = 0;
|
||||
|
||||
#ifdef CLIENT
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SERVER
|
||||
|
|
|
@ -101,6 +101,7 @@ w_g3sg1_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 6;
|
||||
pl.cs_cross_deltadist = 4;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ w_glock18_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,10 @@ w_hegrenade_draw(player pl)
|
|||
Weapons_SetModel("models/v_hegrenade.mdl");
|
||||
Weapons_ViewAnimation(pl, HEGRENADE_DRAW);
|
||||
pl.mode_temp = 0;
|
||||
|
||||
#ifdef CLIENT
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SERVER
|
||||
|
|
|
@ -82,6 +82,10 @@ w_knife_draw(player pl)
|
|||
{
|
||||
Weapons_SetModel("models/v_knife.mdl");
|
||||
Weapons_ViewAnimation(pl, KNIFE_DRAW);
|
||||
|
||||
#ifdef CLIENT
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -148,6 +148,7 @@ w_m3_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 6;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ w_m4a1_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 4;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_mac10_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 9;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_mp5_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 5;
|
||||
pl.cs_cross_deltadist = 2;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ w_p228_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_p90_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 7;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -102,6 +102,7 @@ w_para_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 6;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_scout_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 5;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -102,6 +102,7 @@ w_sg550_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 5;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_sg552_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 5;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,10 @@ w_smokegrenade_draw(player pl)
|
|||
Weapons_SetModel("models/v_smokegrenade.mdl");
|
||||
Weapons_ViewAnimation(pl, SMOKEGRENADE_DRAW);
|
||||
pl.mode_temp = 0;
|
||||
|
||||
#ifdef CLIENT
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SERVER
|
||||
|
|
|
@ -103,6 +103,7 @@ w_tmp_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 7;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ w_ump45_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 6;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ w_usp45_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 8;
|
||||
pl.cs_cross_deltadist = 3;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -182,12 +183,7 @@ w_usp45_primary(player pl)
|
|||
Animation_PlayerTop(pl, ANIM_CROUCH_SHOOT_ONEHAND, 0.45f);
|
||||
|
||||
#ifdef CLIENT
|
||||
if (pl.mode_usp45 == 1) {
|
||||
View_SetMuzzleflash(0);
|
||||
} else {
|
||||
View_SetMuzzleflash(MUZZLE_SMALL);
|
||||
}
|
||||
|
||||
View_SetMuzzleflash(MUZZLE_SMALL);
|
||||
View_AddEvent(w_pistol_ejectshell, 0.0f);
|
||||
#else
|
||||
/* Different sounds without silencer */
|
||||
|
|
|
@ -147,6 +147,7 @@ w_xm1014_draw(player pl)
|
|||
#ifdef CLIENT
|
||||
pl.cs_cross_mindist = 9;
|
||||
pl.cs_cross_deltadist = 4;
|
||||
CStrikeView_UpdateGeomset(pl);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -222,3 +222,15 @@ w_cstrke_switched(player pl)
|
|||
{
|
||||
Cstrike_ShotReset(pl);
|
||||
}
|
||||
|
||||
#ifdef CLIENT
|
||||
void
|
||||
CStrikeView_UpdateGeomset(player pl)
|
||||
{
|
||||
if (getplayerkeyfloat(pl.entnum-1, "*team") == TEAM_CT) {
|
||||
setcustomskin(pSeat->m_eViewModel, "", "geomset 0 2\ngeomset 1 1\n");
|
||||
} else {
|
||||
setcustomskin(pSeat->m_eViewModel, "", "geomset 0 1\ngeomset 1 2\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue