Cstrike: Remove usage of Weapons_ViewPunchAngle, as that's calculated

elsewhere (see weapons_cstrike.c)
This commit is contained in:
Marco Cawthorne 2020-04-07 15:00:11 +02:00
parent a2384fae50
commit 31793440c2
28 changed files with 11 additions and 55 deletions

View file

@ -605,17 +605,16 @@ CSQC_ConsoleCommand(string sCMD)
tokenize(sCMD); tokenize(sCMD);
switch (argv(0)) { switch (argv(0)) {
case "dev_sentence": case "dev_sentence":
static CBaseEntity foo; static CBaseEntity foo;
if (!foo) { if (!foo) {
foo = spawn(CBaseEntity); foo = spawn(CBaseEntity);
foo.drawmask = MASK_ENGINE; foo.drawmask = MASK_ENGINE;
setmodel(foo, "models/headcrab.mdl"); setmodel(foo, "sprites/muzzleflash1.spr");
} }
setorigin(foo, getproperty(VF_ORIGIN)); setorigin(foo, getproperty(VF_ORIGIN));
foo.Sentence(argv(1)); foo.Sentence(argv(1));
break; break;
case "vote": case "vote":
if (argv(1) == "yes") { if (argv(1) == "yes") {
sendevent("VoteY", ""); sendevent("VoteY", "");

View file

@ -14,7 +14,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
int trace_surfaceflagsi; noref int trace_surfaceflagsi;
var vector g_vecLensPos; var vector g_vecLensPos;
var float g_flLensAlpha; var float g_flLensAlpha;

View file

@ -142,8 +142,6 @@ w_ak47_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_ak47.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_ak47.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -142,8 +142,6 @@ w_aug_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_aug.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_aug.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -141,8 +141,6 @@ w_awp_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_awp.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_awp.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -137,7 +137,6 @@ w_deagle_primary(void)
pl.deagle_mag--; pl.deagle_mag--;
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 54, [accuracy,accuracy], WEAPON_DEAGLE); TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 54, [accuracy,accuracy], WEAPON_DEAGLE);
if (self.flags & FL_CROUCHING) if (self.flags & FL_CROUCHING)
Animation_PlayerTopTemp(ANIM_SHOOT1HAND, 0.45f); Animation_PlayerTopTemp(ANIM_SHOOT1HAND, 0.45f);
else else
@ -146,7 +145,6 @@ w_deagle_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_deagle.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_deagle.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
if (pl.a_ammo1 <= 0) { if (pl.a_ammo1 <= 0) {
Weapons_ViewAnimation(DEAGLE_SHOOT_EMPTY); Weapons_ViewAnimation(DEAGLE_SHOOT_EMPTY);

View file

@ -156,8 +156,6 @@ w_elites_primary(void)
pl.a_ammo3 = 1 - pl.a_ammo3; pl.a_ammo3 = 1 - pl.a_ammo3;
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 5; int r = (float)input_sequence % 5;
if (pl.a_ammo3) { if (pl.a_ammo3) {
if (pl.a_ammo1 <= 0) { if (pl.a_ammo1 <= 0) {

View file

@ -145,8 +145,6 @@ w_fiveseven_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_fiveseven.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_fiveseven.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
if (pl.a_ammo1 <= 0) { if (pl.a_ammo1 <= 0) {
Weapons_ViewAnimation(FIVESEVEN_SHOOT_EMPTY); Weapons_ViewAnimation(FIVESEVEN_SHOOT_EMPTY);
} else { } else {

View file

@ -94,7 +94,6 @@ w_flashbang_primary(void)
#ifdef CSQC #ifdef CSQC
View_SetMuzzleflash(MUZZLE_RIFLE); View_SetMuzzleflash(MUZZLE_RIFLE);
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -140,8 +140,6 @@ w_g3sg1_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_g3sg1.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_g3sg1.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 2; int r = (float)input_sequence % 2;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -166,7 +166,6 @@ w_glock18_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_glock18.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_glock18.fire");
} }
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
if (pl.a_ammo3) { if (pl.a_ammo3) {
int r = (float)input_sequence % 2; int r = (float)input_sequence % 2;

View file

@ -91,7 +91,6 @@ w_hegrenade_primary(void)
#ifdef CSQC #ifdef CSQC
View_SetMuzzleflash(MUZZLE_RIFLE); View_SetMuzzleflash(MUZZLE_RIFLE);
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -94,7 +94,6 @@ w_knife_primary(void)
#ifdef CSQC #ifdef CSQC
View_SetMuzzleflash(MUZZLE_RIFLE); View_SetMuzzleflash(MUZZLE_RIFLE);
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -150,8 +150,6 @@ w_m3_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_m3.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_m3.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 2; int r = (float)input_sequence % 2;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -170,7 +170,6 @@ w_m4a1_primary(void)
else else
Animation_PlayerTopTemp(ANIM_CR_SHOOT1HAND, 0.45f); Animation_PlayerTopTemp(ANIM_CR_SHOOT1HAND, 0.45f);
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
/* this stuff is predicted */ /* this stuff is predicted */
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
@ -199,7 +198,6 @@ w_m4a1_primary(void)
break; break;
} }
} }
Weapons_ViewPunchAngle([-2,0,0]);
pl.w_attack_next = 0.0875f; pl.w_attack_next = 0.0875f;
pl.w_idle_next = pl.w_attack_next; pl.w_idle_next = pl.w_attack_next;

View file

@ -141,8 +141,6 @@ w_mac10_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_mac10.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_mac10.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -145,7 +145,6 @@ w_mp5_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_mp5.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_mp5.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -149,8 +149,6 @@ w_p228_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_p228.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_p228.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
if (pl.a_ammo1 <= 0) { if (pl.a_ammo1 <= 0) {
Weapons_ViewAnimation(P228_SHOOT_EMPTY); Weapons_ViewAnimation(P228_SHOOT_EMPTY);
} else { } else {

View file

@ -141,7 +141,6 @@ w_p90_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_p90.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_p90.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -141,8 +141,6 @@ w_para_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_para.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_para.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 2; int r = (float)input_sequence % 2;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -141,8 +141,6 @@ w_scout_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_scout.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_scout.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 2; int r = (float)input_sequence % 2;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -141,8 +141,6 @@ w_sg550_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_sg550.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_sg550.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 2; int r = (float)input_sequence % 2;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -142,8 +142,6 @@ w_sg552_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_sg552.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_sg552.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -94,7 +94,6 @@ w_smokegrenade_primary(void)
#ifdef CSQC #ifdef CSQC
View_SetMuzzleflash(MUZZLE_RIFLE); View_SetMuzzleflash(MUZZLE_RIFLE);
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -141,7 +141,6 @@ w_tmp_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_tmp.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_tmp.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {

View file

@ -142,8 +142,6 @@ w_ump45_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_ump45.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_ump45.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0:

View file

@ -175,7 +175,6 @@ w_usp45_primary(void)
else else
Animation_PlayerTopTemp(ANIM_CR_SHOOT1HAND, 0.45f); Animation_PlayerTopTemp(ANIM_CR_SHOOT1HAND, 0.45f);
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
/* this stuff is predicted */ /* this stuff is predicted */
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;

View file

@ -152,8 +152,6 @@ w_xm1014_primary(void)
Sound_Play(pl, CHAN_WEAPON, "weapon_xm1014.fire"); Sound_Play(pl, CHAN_WEAPON, "weapon_xm1014.fire");
#endif #endif
Weapons_ViewPunchAngle([-2,0,0]);
int r = (float)input_sequence % 3; int r = (float)input_sequence % 3;
switch (r) { switch (r) {
case 0: case 0: